From 195dd8c1493325559c41b49e21086f4581c984e4 Mon Sep 17 00:00:00 2001 From: Hemant Singh Date: Sat, 10 Feb 2024 16:55:39 +0530 Subject: [PATCH] Updates --- asset-manifest.json | 6 +++--- index.html | 2 +- ... precache-manifest.d6e42d3f3d8a6d92a9c88c6369805c1b.js | 8 ++++---- service-worker.js | 2 +- static/js/main.52572780.chunk.js | 2 -- static/js/main.52572780.chunk.js.map | 1 - static/js/main.630d6641.chunk.js | 2 ++ static/js/main.630d6641.chunk.js.map | 1 + 8 files changed, 12 insertions(+), 12 deletions(-) rename precache-manifest.c69253d6b2e0bf536f40ec400d1e4eb3.js => precache-manifest.d6e42d3f3d8a6d92a9c88c6369805c1b.js (76%) delete mode 100644 static/js/main.52572780.chunk.js delete mode 100644 static/js/main.52572780.chunk.js.map create mode 100644 static/js/main.630d6641.chunk.js create mode 100644 static/js/main.630d6641.chunk.js.map diff --git a/asset-manifest.json b/asset-manifest.json index e56b2db..cf4a90e 100644 --- a/asset-manifest.json +++ b/asset-manifest.json @@ -1,15 +1,15 @@ { "files": { "main.css": "/News-React/static/css/main.f0470f58.chunk.css", - "main.js": "/News-React/static/js/main.52572780.chunk.js", - "main.js.map": "/News-React/static/js/main.52572780.chunk.js.map", + "main.js": "/News-React/static/js/main.630d6641.chunk.js", + "main.js.map": "/News-React/static/js/main.630d6641.chunk.js.map", "runtime~main.js": "/News-React/static/js/runtime~main.7d41ec62.js", "runtime~main.js.map": "/News-React/static/js/runtime~main.7d41ec62.js.map", "static/css/2.0ba87e64.chunk.css": "/News-React/static/css/2.0ba87e64.chunk.css", "static/js/2.df7e85f1.chunk.js": "/News-React/static/js/2.df7e85f1.chunk.js", "static/js/2.df7e85f1.chunk.js.map": "/News-React/static/js/2.df7e85f1.chunk.js.map", "index.html": "/News-React/index.html", - "precache-manifest.c69253d6b2e0bf536f40ec400d1e4eb3.js": "/News-React/precache-manifest.c69253d6b2e0bf536f40ec400d1e4eb3.js", + "precache-manifest.d6e42d3f3d8a6d92a9c88c6369805c1b.js": "/News-React/precache-manifest.d6e42d3f3d8a6d92a9c88c6369805c1b.js", "service-worker.js": "/News-React/service-worker.js", "static/css/2.0ba87e64.chunk.css.map": "/News-React/static/css/2.0ba87e64.chunk.css.map", "static/css/main.f0470f58.chunk.css.map": "/News-React/static/css/main.f0470f58.chunk.css.map", diff --git a/index.html b/index.html index e41f352..a45bc3e 100644 --- a/index.html +++ b/index.html @@ -1 +1 @@ -React App
\ No newline at end of file +React App
\ No newline at end of file diff --git a/precache-manifest.c69253d6b2e0bf536f40ec400d1e4eb3.js b/precache-manifest.d6e42d3f3d8a6d92a9c88c6369805c1b.js similarity index 76% rename from precache-manifest.c69253d6b2e0bf536f40ec400d1e4eb3.js rename to precache-manifest.d6e42d3f3d8a6d92a9c88c6369805c1b.js index 556c59a..08b72f7 100644 --- a/precache-manifest.c69253d6b2e0bf536f40ec400d1e4eb3.js +++ b/precache-manifest.d6e42d3f3d8a6d92a9c88c6369805c1b.js @@ -1,6 +1,6 @@ self.__precacheManifest = (self.__precacheManifest || []).concat([ { - "revision": "fbcba83231a36028217a0b670ad64b23", + "revision": "86812df30a42fc6e284df9148652929b", "url": "/News-React/index.html" }, { @@ -8,7 +8,7 @@ self.__precacheManifest = (self.__precacheManifest || []).concat([ "url": "/News-React/static/css/2.0ba87e64.chunk.css" }, { - "revision": "7c36dacb6e63f37749c9", + "revision": "242f4e1447d3eb324b07", "url": "/News-React/static/css/main.f0470f58.chunk.css" }, { @@ -16,8 +16,8 @@ self.__precacheManifest = (self.__precacheManifest || []).concat([ "url": "/News-React/static/js/2.df7e85f1.chunk.js" }, { - "revision": "7c36dacb6e63f37749c9", - "url": "/News-React/static/js/main.52572780.chunk.js" + "revision": "242f4e1447d3eb324b07", + "url": "/News-React/static/js/main.630d6641.chunk.js" }, { "revision": "ac03c205bd7ed10d6c14", diff --git a/service-worker.js b/service-worker.js index 05bfd21..d963561 100644 --- a/service-worker.js +++ b/service-worker.js @@ -14,7 +14,7 @@ importScripts("https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js"); importScripts( - "/News-React/precache-manifest.c69253d6b2e0bf536f40ec400d1e4eb3.js" + "/News-React/precache-manifest.d6e42d3f3d8a6d92a9c88c6369805c1b.js" ); self.addEventListener('message', (event) => { diff --git a/static/js/main.52572780.chunk.js b/static/js/main.52572780.chunk.js deleted file mode 100644 index 3c00d58..0000000 --- a/static/js/main.52572780.chunk.js +++ /dev/null @@ -1,2 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[0],{213:function(e,t,s){e.exports=s(429)},218:function(e,t,s){},219:function(e,t,s){e.exports=s.p+"static/media/logo.5d5d9eef.svg"},220:function(e,t,s){},234:function(e,t){},236:function(e,t){},429:function(e,t,s){"use strict";s.r(t);var n=s(1),o=s.n(n),r=s(8),a=s.n(r),i=(s(218),s(40)),c=s(41),l=s(43),u=s(42),h=s(44),p=(s(219),s(220),s(221),s(145)),d=s(432),m=(s(11),s(108)),f=s(435),w=s(434),g=s(200),v=s.n(g),b=s(251),k=function(e){function t(){var e,s;Object(i.a)(this,t);for(var n=arguments.length,o=new Array(n),r=0;r (\n \n \n {text}\n \n );\n\nclass FeedList extends Component {\n state = {\n feed: [],\n loading: true\n };\n componentDidMount(){\n this.fetchFeed(this.props.url);\n }\n componentWillReceiveProps(nextProps){\n console.log(\"New Props\", nextProps);\n this.fetchFeed(nextProps.url);\n }\n fetchFeed(url){\n let self = this;\n self.setState({ feed: [], loading: true });\n const CORS_PROXY = \"https://getrssfeed-mm5zus754q-uc.a.run.app?url=\"\n let parser = new RSSParser();\n parser.parseURL(CORS_PROXY + url, function(err, rssfeed) {\n if (rssfeed !== undefined) {\n console.log(\"Feed\", rssfeed);\n self.setState({ feed: rssfeed.items, loading: false });\n }\n})\n }\n render() {\n const { feed, loading } = this.state;\n const view = loading ? : {\n console.log(page);\n },\n pageSize: 10,\n }}\n dataSource={feed}\n renderItem={item => (\n \n Full Story}\n title={item.title}>{renderHTML(item.content)}\n \n )}\n />;\n return (\n view\n );\n}\n}\nexport default FeedList;","import React, { Component } from 'react';\nimport { Table, Divider, Tag } from 'antd';\n\nconst { Column, ColumnGroup } = Table;\n\nconst dataUrl = \"https://api.data.gov.in/resource/98fa254e-c5f8-4910-a19b-4828939b477d?api-key=579b464db66ec23bdd00000199230f51e148472049284df3dd2e95c8&format=json&offset=0&limit=100\";\nclass HDirectory extends Component {\n state = {\n hospitals: [],\n loading: true\n };\n componentDidMount(){\n let self = this;\n fetch(dataUrl, {\n method: 'GET'\n })\n .then(response => response.json())\n .catch(error => console.log(error))\n .then(json => self.setState({ hospitals: json.records, loading: false }))\n }\n \n render() {\n const { hospitals, loading } = this.state;\n return (\n \n \n (\n \n {record._location}, {record.district}, {record.state} \n \n )}\n />\n (\n \n View on Map\n \n Call {record.mobile_number}\n \n )}\n />\n
\n );\n }\n}\n\nexport default HDirectory;\n","import React, { Component } from 'react';\nimport logo from './logo.svg';\nimport './App.css';\nimport 'antd/dist/antd.css';\nimport { Layout, Menu, Breadcrumb, Icon } from 'antd';\nimport FeedList from './FeedItem/FeedList';\nimport HDirectory from './Hospitals/HDirectory';\nconst { SubMenu } = Menu;\nconst { Header, Content, Sider } = Layout;\nclass App extends Component {\n state = {\n feed: {\n \"Comics\": {\n \"Buttersafe\": \"https://feeds.feedburner.com/Buttersafe?format=xml\",\n \"Oglaf\": \"https://oglaf.com/feeds/rss/\",\n \"SMBC\": \"https://www.smbc-comics.com/rss.php\",\n \"What If\": \"httpss://what-if.xkcd.com/feed.atom\",\n \"XKCD\": \"httpss://xkcd.com/atom.xml\"\n },\n \"Entertainment\": {\n \"BBC\": \"https://feeds.bbci.co.uk/news/entertainment_and_arts/rss.xml\",\n \"CNN\": \"http://rss.cnn.com/rss/edition_entertainment.rss\",\n \"Hindu\": \"https://www.thehindu.com/entertainment/?service=rss\",\n \"Quora\": \"httpss://www.quora.com/topic/Entertainment/rss\",\n \"Reuters\": \"https://feeds.reuters.com/reuters/entertainment\",\n \"W Post\": \"https://feeds.washingtonpost.com/rss/entertainment\"\n },\n \"Health\": {\n \"BBC\": \"https://feeds.bbci.co.uk/news/health/rss.xml\",\n \"Health\": \"https://www.health.com/health/diet-fitness/feed\",\n \"Hindu\": \"https://www.thehindu.com/sci-tech/health/?service=rss\",\n \"Quora\": \"httpss://www.quora.com/topic/Health/rss\",\n \"Reuters\": \"https://feeds.reuters.com/reuters/healthNews\",\n \"W Post\": \"https://feeds.washingtonpost.com/rss/rss_to-your-health\"\n },\n \"Politics\": {\n \"BBC\": \"https://feeds.bbci.co.uk/news/politics/rss.xml\",\n \"NPR\": \"https://www.npr.org/rss/rss.php?id=1012\",\n \"RC Politics\": \"https://www.realclearpolitics.com/index.xml\",\n \"RCP\": \"https://feeds.feedburner.com/realclearpolitics/qlMj\",\n \"Reuters\": \"https://feeds.reuters.com/Reuters/PoliticsNews\",\n \"W Post\": \"https://feeds.washingtonpost.com/rss/politics\"\n },\n \"Science\": {\n \"BBC\": \"https://feeds.bbci.co.uk/news/science_and_environment/rss.xml\",\n \"CNN\": \"http://rss.cnn.com/rss/edition_space.rss\",\n \"Hindu\": \"https://www.thehindu.com/sci-tech/?service=rss\",\n \"Quora\": \"httpss://www.quora.com/topic/Science/rss\",\n \"Reuters\": \"https://feeds.reuters.com/reuters/scienceNews\",\n \"W Post\": \"https://feeds.washingtonpost.com/rss/rss_speaking-of-science\"\n },\n \"Sports\": {\n \"BBC\": \"https://newsrss.bbc.co.uk/rss/sportonline_uk_edition/front_page/rss.xml\",\n \"CNN\": \"http://rss.cnn.com/rss/edition_sport.rss\",\n \"Hindu\": \"https://www.thehindu.com/sport/?service=rss\",\n \"Quora\": \"httpss://www.quora.com/topic/Sports/rss\",\n \"Reuters\": \"https://feeds.reuters.com/reuters/sportsNews\",\n \"W Post\": \"https://feeds.washingtonpost.com/rss/sports\"\n },\n \"World\": {\n \"BBC\": \"https://feeds.bbci.co.uk/news/world/rss.xml\",\n \"CNN\": \"http://rss.cnn.com/rss/edition_world.rss\",\n \"Hindu\": \"https://www.thehindu.com/news/international/world/?service=rss\",\n \"NPR\": \"https://www.npr.org/rss/rss.php\",\n \"Reuters\": \"https://feeds.reuters.com/reuters/INworldNews\",\n \"W Post\": \"https://feeds.washingtonpost.com/rss/world\"\n }\n },\n url: 'https://feeds.feedburner.com/Buttersafe?format=xml'\n }\n \n render() {\n const categories = Object.keys(this.state.feed);\n const channels = Object.values(this.state.feed);\n console.log(this.state.url);\n return (\n
\n \n
\n \n {categories.map((cat, index) => {\n return (\n \n {Object.keys(channels[index]).map(channel => {\n return (\n { this.setState({url: Object.values(channels)[index][channel] })}}>{channel}\n );\n})}\n \n );\n })}\n \n
\n \n \n \n \n \n \n \n
\n
\n );\n }\n}\n\nexport default App;\n","// In production, we register a service worker to serve assets from local cache.\n\n// This lets the app load faster on subsequent visits in production, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on the \"N+1\" visit to a page, since previously\n// cached resources are updated in the background.\n\n// To learn more about the benefits of this model, read https://goo.gl/KwvDNy.\n// This link also includes instructions on opting out of this behavior.\n\nconst isLocalhost = Boolean(\n window.location.hostname === 'localhost' ||\n // [::1] is the IPv6 localhost address.\n window.location.hostname === '[::1]' ||\n // 127.0.0.1/8 is considered localhost for IPv4.\n window.location.hostname.match(\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\n )\n);\n\nexport default function register() {\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\n // The URL constructor is available in all browsers that support SW.\n const publicUrl = new URL(process.env.PUBLIC_URL, window.location);\n if (publicUrl.origin !== window.location.origin) {\n // Our service worker won't work if PUBLIC_URL is on a different origin\n // from what our page is served on. This might happen if a CDN is used to\n // serve assets; see https://github.com/facebookincubator/create-react-app/issues/2374\n return;\n }\n\n window.addEventListener('load', () => {\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\n\n if (isLocalhost) {\n // This is running on localhost. Lets check if a service worker still exists or not.\n checkValidServiceWorker(swUrl);\n\n // Add some additional logging to localhost, pointing developers to the\n // service worker/PWA documentation.\n navigator.serviceWorker.ready.then(() => {\n console.log(\n 'This web app is being served cache-first by a service ' +\n 'worker. To learn more, visit https://goo.gl/SC7cgQ'\n );\n });\n } else {\n // Is not local host. Just register service worker\n registerValidSW(swUrl);\n }\n });\n }\n}\n\nfunction registerValidSW(swUrl) {\n navigator.serviceWorker\n .register(swUrl)\n .then(registration => {\n registration.onupdatefound = () => {\n const installingWorker = registration.installing;\n installingWorker.onstatechange = () => {\n if (installingWorker.state === 'installed') {\n if (navigator.serviceWorker.controller) {\n // At this point, the old content will have been purged and\n // the fresh content will have been added to the cache.\n // It's the perfect time to display a \"New content is\n // available; please refresh.\" message in your web app.\n console.log('New content is available; please refresh.');\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a\n // \"Content is cached for offline use.\" message.\n console.log('Content is cached for offline use.');\n }\n }\n };\n };\n })\n .catch(error => {\n console.error('Error during service worker registration:', error);\n });\n}\n\nfunction checkValidServiceWorker(swUrl) {\n // Check if the service worker can be found. If it can't reload the page.\n fetch(swUrl)\n .then(response => {\n // Ensure service worker exists, and that we really are getting a JS file.\n if (\n response.status === 404 ||\n response.headers.get('content-type').indexOf('javascript') === -1\n ) {\n // No service worker found. Probably a different app. Reload the page.\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister().then(() => {\n window.location.reload();\n });\n });\n } else {\n // Service worker found. Proceed as normal.\n registerValidSW(swUrl);\n }\n })\n .catch(() => {\n console.log(\n 'No internet connection found. App is running in offline mode.'\n );\n });\n}\n\nexport function unregister() {\n if ('serviceWorker' in navigator) {\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister();\n });\n }\n}\n","import React from 'react';\nexport default class Test extends React.Component {\n \n constructor() {\n super(); \n this.name = 'MyComponent';\n \n this.handleClick2 = this.handleClick1.bind(this);\n }\n \n handleClick1() {\n alert(this.name);\n }\n \n handleClick3 = () => alert(this.name);\n render() {\n return (\n
\n \n \n \n \n
\n );\n }\n }","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport './index.css';\nimport App from './App';\nimport Test from './Test';\nimport HDirectory from './Hospitals/HDirectory';\nimport registerServiceWorker from './registerServiceWorker';\nimport 'rss-parser/dist/rss-parser.min.js';\n\nReactDOM.render(, document.getElementById('root'));\nregisterServiceWorker();\n"],"sourceRoot":""} \ No newline at end of file diff --git a/static/js/main.630d6641.chunk.js b/static/js/main.630d6641.chunk.js new file mode 100644 index 0000000..19c928b --- /dev/null +++ b/static/js/main.630d6641.chunk.js @@ -0,0 +1,2 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[0],{213:function(e,t,s){e.exports=s(429)},218:function(e,t,s){},219:function(e,t,s){e.exports=s.p+"static/media/logo.5d5d9eef.svg"},220:function(e,t,s){},234:function(e,t){},236:function(e,t){},429:function(e,t,s){"use strict";s.r(t);var n=s(1),o=s.n(n),r=s(8),a=s.n(r),i=(s(218),s(40)),c=s(41),l=s(43),u=s(42),h=s(44),p=(s(219),s(220),s(221),s(145)),d=s(432),m=(s(11),s(108)),f=s(435),w=s(434),g=s(200),v=s.n(g),b=s(251),k=function(e){function t(){var e,s;Object(i.a)(this,t);for(var n=arguments.length,o=new Array(n),r=0;r (\n \n \n {text}\n \n );\n\nclass FeedList extends Component {\n state = {\n feed: [],\n loading: true\n };\n componentDidMount(){\n this.fetchFeed(this.props.url);\n }\n componentWillReceiveProps(nextProps){\n console.log(\"New Props\", nextProps);\n this.fetchFeed(nextProps.url);\n }\n fetchFeed(url){\n let self = this;\n self.setState({ feed: [], loading: true });\n const CORS_PROXY = \"https://getrssfeed-mm5zus754q-uc.a.run.app?url=\"\n let parser = new RSSParser();\n parser.parseURL(CORS_PROXY + url, function(err, rssfeed) {\n if (rssfeed !== undefined) {\n console.log(\"Feed\", rssfeed);\n self.setState({ feed: rssfeed.items, loading: false });\n }\n})\n }\n render() {\n const { feed, loading } = this.state;\n const view = loading ? : {\n console.log(page);\n },\n pageSize: 10,\n }}\n dataSource={feed}\n renderItem={item => (\n \n Full Story}\n title={item.title}>{renderHTML(item.content)}\n \n )}\n />;\n return (\n view\n );\n}\n}\nexport default FeedList;","import React, { Component } from 'react';\nimport { Table, Divider, Tag } from 'antd';\n\nconst { Column, ColumnGroup } = Table;\n\nconst dataUrl = \"https://api.data.gov.in/resource/98fa254e-c5f8-4910-a19b-4828939b477d?api-key=579b464db66ec23bdd00000199230f51e148472049284df3dd2e95c8&format=json&offset=0&limit=100\";\nclass HDirectory extends Component {\n state = {\n hospitals: [],\n loading: true\n };\n componentDidMount(){\n let self = this;\n fetch(dataUrl, {\n method: 'GET'\n })\n .then(response => response.json())\n .catch(error => console.log(error))\n .then(json => self.setState({ hospitals: json.records, loading: false }))\n }\n \n render() {\n const { hospitals, loading } = this.state;\n return (\n \n \n (\n \n {record._location}, {record.district}, {record.state} \n \n )}\n />\n (\n \n View on Map\n \n Call {record.mobile_number}\n \n )}\n />\n
\n );\n }\n}\n\nexport default HDirectory;\n","import React, { Component } from 'react';\nimport logo from './logo.svg';\nimport './App.css';\nimport 'antd/dist/antd.css';\nimport { Layout, Menu, Breadcrumb, Icon } from 'antd';\nimport FeedList from './FeedItem/FeedList';\nimport HDirectory from './Hospitals/HDirectory';\nconst { SubMenu } = Menu;\nconst { Header, Content, Sider } = Layout;\nclass App extends Component {\n state = {\n feed: {\n \"Comics\": {\n \"Buttersafe\": \"https://feeds.feedburner.com/Buttersafe?format=xml\",\n \"Oglaf\": \"https://oglaf.com/feeds/rss/\",\n \"SMBC\": \"https://www.smbc-comics.com/rss.php\",\n \"What If\": \"https://what-if.xkcd.com/feed.atom\",\n \"XKCD\": \"https://xkcd.com/atom.xml\"\n },\n \"Entertainment\": {\n \"BBC\": \"https://feeds.bbci.co.uk/news/entertainment_and_arts/rss.xml\",\n \"CNN\": \"http://rss.cnn.com/rss/edition_entertainment.rss\",\n \"Hindu\": \"https://www.thehindu.com/entertainment/?service=rss\",\n \"Quora\": \"https://www.quora.com/topic/Entertainment/rss\",\n \"Reuters\": \"https://feeds.reuters.com/reuters/entertainment\",\n \"W Post\": \"https://feeds.washingtonpost.com/rss/entertainment\"\n },\n \"Health\": {\n \"BBC\": \"https://feeds.bbci.co.uk/news/health/rss.xml\",\n \"Health\": \"https://www.health.com/health/diet-fitness/feed\",\n \"Hindu\": \"https://www.thehindu.com/sci-tech/health/?service=rss\",\n \"Quora\": \"https://www.quora.com/topic/Health/rss\",\n \"Reuters\": \"https://feeds.reuters.com/reuters/healthNews\",\n \"W Post\": \"https://feeds.washingtonpost.com/rss/rss_to-your-health\"\n },\n \"Politics\": {\n \"BBC\": \"https://feeds.bbci.co.uk/news/politics/rss.xml\",\n \"NPR\": \"https://www.npr.org/rss/rss.php?id=1012\",\n \"RC Politics\": \"https://www.realclearpolitics.com/index.xml\",\n \"RCP\": \"https://feeds.feedburner.com/realclearpolitics/qlMj\",\n \"Reuters\": \"https://feeds.reuters.com/Reuters/PoliticsNews\",\n \"W Post\": \"https://feeds.washingtonpost.com/rss/politics\"\n },\n \"Science\": {\n \"BBC\": \"https://feeds.bbci.co.uk/news/science_and_environment/rss.xml\",\n \"CNN\": \"http://rss.cnn.com/rss/edition_space.rss\",\n \"Hindu\": \"https://www.thehindu.com/sci-tech/?service=rss\",\n \"Quora\": \"https://www.quora.com/topic/Science/rss\",\n \"Reuters\": \"https://feeds.reuters.com/reuters/scienceNews\",\n \"W Post\": \"https://feeds.washingtonpost.com/rss/rss_speaking-of-science\"\n },\n \"Sports\": {\n \"BBC\": \"https://newsrss.bbc.co.uk/rss/sportonline_uk_edition/front_page/rss.xml\",\n \"CNN\": \"http://rss.cnn.com/rss/edition_sport.rss\",\n \"Hindu\": \"https://www.thehindu.com/sport/?service=rss\",\n \"Quora\": \"https://www.quora.com/topic/Sports/rss\",\n \"Reuters\": \"https://feeds.reuters.com/reuters/sportsNews\",\n \"W Post\": \"https://feeds.washingtonpost.com/rss/sports\"\n },\n \"World\": {\n \"BBC\": \"https://feeds.bbci.co.uk/news/world/rss.xml\",\n \"CNN\": \"http://rss.cnn.com/rss/edition_world.rss\",\n \"Hindu\": \"https://www.thehindu.com/news/international/world/?service=rss\",\n \"NPR\": \"https://www.npr.org/rss/rss.php\",\n \"Reuters\": \"https://feeds.reuters.com/reuters/INworldNews\",\n \"W Post\": \"https://feeds.washingtonpost.com/rss/world\"\n }\n },\n url: 'https://feeds.feedburner.com/Buttersafe?format=xml'\n }\n \n render() {\n const categories = Object.keys(this.state.feed);\n const channels = Object.values(this.state.feed);\n console.log(this.state.url);\n return (\n
\n \n
\n \n {categories.map((cat, index) => {\n return (\n \n {Object.keys(channels[index]).map(channel => {\n return (\n { this.setState({url: Object.values(channels)[index][channel] })}}>{channel}\n );\n})}\n \n );\n })}\n \n
\n \n \n \n \n \n \n \n
\n
\n );\n }\n}\n\nexport default App;\n","// In production, we register a service worker to serve assets from local cache.\n\n// This lets the app load faster on subsequent visits in production, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on the \"N+1\" visit to a page, since previously\n// cached resources are updated in the background.\n\n// To learn more about the benefits of this model, read https://goo.gl/KwvDNy.\n// This link also includes instructions on opting out of this behavior.\n\nconst isLocalhost = Boolean(\n window.location.hostname === 'localhost' ||\n // [::1] is the IPv6 localhost address.\n window.location.hostname === '[::1]' ||\n // 127.0.0.1/8 is considered localhost for IPv4.\n window.location.hostname.match(\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\n )\n);\n\nexport default function register() {\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\n // The URL constructor is available in all browsers that support SW.\n const publicUrl = new URL(process.env.PUBLIC_URL, window.location);\n if (publicUrl.origin !== window.location.origin) {\n // Our service worker won't work if PUBLIC_URL is on a different origin\n // from what our page is served on. This might happen if a CDN is used to\n // serve assets; see https://github.com/facebookincubator/create-react-app/issues/2374\n return;\n }\n\n window.addEventListener('load', () => {\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\n\n if (isLocalhost) {\n // This is running on localhost. Lets check if a service worker still exists or not.\n checkValidServiceWorker(swUrl);\n\n // Add some additional logging to localhost, pointing developers to the\n // service worker/PWA documentation.\n navigator.serviceWorker.ready.then(() => {\n console.log(\n 'This web app is being served cache-first by a service ' +\n 'worker. To learn more, visit https://goo.gl/SC7cgQ'\n );\n });\n } else {\n // Is not local host. Just register service worker\n registerValidSW(swUrl);\n }\n });\n }\n}\n\nfunction registerValidSW(swUrl) {\n navigator.serviceWorker\n .register(swUrl)\n .then(registration => {\n registration.onupdatefound = () => {\n const installingWorker = registration.installing;\n installingWorker.onstatechange = () => {\n if (installingWorker.state === 'installed') {\n if (navigator.serviceWorker.controller) {\n // At this point, the old content will have been purged and\n // the fresh content will have been added to the cache.\n // It's the perfect time to display a \"New content is\n // available; please refresh.\" message in your web app.\n console.log('New content is available; please refresh.');\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a\n // \"Content is cached for offline use.\" message.\n console.log('Content is cached for offline use.');\n }\n }\n };\n };\n })\n .catch(error => {\n console.error('Error during service worker registration:', error);\n });\n}\n\nfunction checkValidServiceWorker(swUrl) {\n // Check if the service worker can be found. If it can't reload the page.\n fetch(swUrl)\n .then(response => {\n // Ensure service worker exists, and that we really are getting a JS file.\n if (\n response.status === 404 ||\n response.headers.get('content-type').indexOf('javascript') === -1\n ) {\n // No service worker found. Probably a different app. Reload the page.\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister().then(() => {\n window.location.reload();\n });\n });\n } else {\n // Service worker found. Proceed as normal.\n registerValidSW(swUrl);\n }\n })\n .catch(() => {\n console.log(\n 'No internet connection found. App is running in offline mode.'\n );\n });\n}\n\nexport function unregister() {\n if ('serviceWorker' in navigator) {\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister();\n });\n }\n}\n","import React from 'react';\nexport default class Test extends React.Component {\n \n constructor() {\n super(); \n this.name = 'MyComponent';\n \n this.handleClick2 = this.handleClick1.bind(this);\n }\n \n handleClick1() {\n alert(this.name);\n }\n \n handleClick3 = () => alert(this.name);\n render() {\n return (\n
\n \n \n \n \n
\n );\n }\n }","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport './index.css';\nimport App from './App';\nimport Test from './Test';\nimport HDirectory from './Hospitals/HDirectory';\nimport registerServiceWorker from './registerServiceWorker';\nimport 'rss-parser/dist/rss-parser.min.js';\n\nReactDOM.render(, document.getElementById('root'));\nregisterServiceWorker();\n"],"sourceRoot":""} \ No newline at end of file