4 |
5 |
6 |
7 |
8 |
12 |
13 |
17 |
18 |
27 | React App
28 |
34 |
35 |
36 |
37 |
38 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/swyxio/talk-typesafe-fullstack-react-demo-cms/b368c212fcd129aae27c23d77b2de41b23869ac8/public/logo192.png
--------------------------------------------------------------------------------
/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/swyxio/talk-typesafe-fullstack-react-demo-cms/b368c212fcd129aae27c23d77b2de41b23869ac8/public/logo512.png
--------------------------------------------------------------------------------
/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/src/App.css:
--------------------------------------------------------------------------------
1 | .App {
2 | text-align: center;
3 | }
4 |
5 | .App-logo {
6 | height: 40vmin;
7 | pointer-events: none;
8 | }
9 |
10 | @media (prefers-reduced-motion: no-preference) {
11 | .App-logo {
12 | animation: App-logo-spin infinite 20s linear;
13 | }
14 | }
15 |
16 | .App-header {
17 | background-color: #282c34;
18 | min-height: 100vh;
19 | display: flex;
20 | flex-direction: column;
21 | align-items: center;
22 | justify-content: center;
23 | font-size: calc(10px + 2vmin);
24 | color: white;
25 | }
26 |
27 | .App-link {
28 | color: #61dafb;
29 | }
30 |
31 | @keyframes App-logo-spin {
32 | from {
33 | transform: rotate(0deg);
34 | }
35 | to {
36 | transform: rotate(360deg);
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/App.test.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { render } from '@testing-library/react';
3 | import App from './App';
4 |
5 | test('renders learn react link', () => {
6 | const { getByText } = render();
7 | const linkElement = getByText(/learn react/i);
8 | expect(linkElement).toBeInTheDocument();
9 | });
10 |
--------------------------------------------------------------------------------
/src/App.tsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import {
3 | Stack,
4 | Flex,
5 | Button,
6 | FormControl,
7 | FormLabel,
8 | Input,
9 | FormErrorMessage,
10 | Box,
11 | Text,
12 | Link,
13 | Grid,
14 | Image,
15 | Container,
16 | Textarea,
17 | Heading,
18 | } from "@chakra-ui/core";
19 |
20 | import { Formik, Form, Field } from "formik";
21 | import { news } from "./news";
22 |
23 | type Blog = {
24 | title: string;
25 | image: string;
26 | body: string;
27 | id?: string;
28 | createdAt?: Date;
29 | updatedAt?: Date;
30 | };
31 |
32 | function App() {
33 | const [blogs, setBlogs] = React.useState([]);
34 | const [currentSelectedBlog, setCurrentSelectedBlog] = React.useState();
35 | async function addBlog(values: Blog) {
36 | const timestamp = new Date();
37 | const newBlog: Blog = {
38 | ...values,
39 | id: uuidv4(),
40 | createdAt: timestamp,
41 | updatedAt: timestamp,
42 | };
43 | setBlogs([...blogs, newBlog]);
44 | }
45 | function _updateBlog(oldValues: Blog) {
46 | return async function (newValues: Blog) {
47 | const timestamp = new Date();
48 | const newBlog: Blog = {
49 | ...newValues,
50 | createdAt: oldValues.createdAt,
51 | updatedAt: timestamp,
52 | };
53 | setBlogs([...blogs.filter((x) => x.id !== oldValues.id), newBlog]);
54 | };
55 | }
56 | return (
57 |
58 |
59 |
60 | React + TypeScript + GraphQL + AWS CMS
61 |
62 |
70 | https://git.io/JUBZX
71 |
72 |
73 |
74 |
82 | {blogs.length > 0 && (
83 |
91 | {blogs.map((blog, key) => {
92 | return (
93 |
103 | );
104 | })}
105 |
106 | )}
107 |
108 |
109 | );
110 | }
111 |
112 | function BlogLine({
113 | blog,
114 | selected,
115 | setCurrentSelectedBlog,
116 | }: {
117 | blog: Blog;
118 | selected: boolean;
119 | setCurrentSelectedBlog: (blog: Blog) => void;
120 | }) {
121 | return (
122 | <>
123 | {/* */}
124 |
133 | {/* */}
134 | setCurrentSelectedBlog(blog)}
138 | backgroundColor={selected ? "rgba(150,150,250, 0.1)" : undefined}
139 | >
140 |
147 | {String(blog.updatedAt?.toDateString())}
148 |
149 |
156 | {String(blog.title)}
157 |
158 |
159 | {String(blog.body.slice(0, 90))}...
160 |
161 |
162 | >
163 | );
164 | }
165 |
166 | function Editor(props: {
167 | initVals?: Blog;
168 | onSubmit: (values: any) => Promise;
169 | setCurrentSelectedBlog: (blog?: Blog) => void;
170 | }) {
171 | const initVals = props.initVals || ({} as Blog);
172 | return (
173 |
182 |
183 | initialValues={initVals}
184 | onSubmit={(values, actions) => {
185 | props.onSubmit(values).then(() => {
186 | actions.setSubmitting(false);
187 | actions.resetForm({
188 | values: {
189 | title: "",
190 | image: "",
191 | body: "",
192 | },
193 | });
194 | });
195 | }}
196 | >
197 | {(_props) => (
198 |
310 | )}
311 |
312 |
313 | );
314 | }
315 |
316 | export default App;
317 |
318 | function uuidv4() {
319 | return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (c) {
320 | var r = (Math.random() * 16) | 0,
321 | // eslint-disable-next-line
322 | v = c == "x" ? r : (r & 0x3) | 0x8;
323 | return v.toString(16);
324 | });
325 | }
326 |
--------------------------------------------------------------------------------
/src/index.css:
--------------------------------------------------------------------------------
1 | body {
2 | margin: 0;
3 | font-family: "Museo Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
4 | "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue",
5 | sans-serif;
6 | -webkit-font-smoothing: antialiased;
7 | -moz-osx-font-smoothing: grayscale;
8 | }
9 |
10 | code {
11 | font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New",
12 | monospace;
13 | }
14 |
15 | /* * {
16 | outline: 1px solid red;
17 | } */
18 |
--------------------------------------------------------------------------------
/src/index.tsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import ReactDOM from "react-dom";
3 | import "./index.css";
4 | import App from "./App";
5 | import * as serviceWorker from "./serviceWorker";
6 |
7 | import { ChakraProvider } from "@chakra-ui/core";
8 |
9 | // Use at the root of your app
10 | ReactDOM.render(
11 |
12 |
13 |
14 |
15 | ,
16 | document.getElementById("root")
17 | );
18 |
19 | // If you want your app to work offline and load faster, you can change
20 | // unregister() to register() below. Note this comes with some pitfalls.
21 | // Learn more about service workers: https://bit.ly/CRA-PWA
22 | serviceWorker.unregister();
23 |
--------------------------------------------------------------------------------
/src/logo.svg:
--------------------------------------------------------------------------------
1 |
8 |
--------------------------------------------------------------------------------
/src/news.ts:
--------------------------------------------------------------------------------
1 | export const news = [
2 | {
3 | source: {
4 | id: "techcrunch",
5 | name: "TechCrunch",
6 | },
7 | author: "Kirsten Korosec",
8 | title:
9 | "Carbon Health and Color founders see power in bringing healthcare to the edge",
10 | description:
11 | "When COVID-19 spread to the United States, the pandemic exposed two conflicting realities: a healthcare system that excels at high-cost, complex treatments, while failing to provide sufficient access at the local level. It's also created opportunities for hea…",
12 | url:
13 | "https://techcrunch.com/2020/09/14/carbon-health-and-color-founders-see-power-in-bringing-healthcare-to-the-edge/",
14 | urlToImage:
15 | "https://s.yimg.com/ny/api/res/1.2/nVda6lNWCtsyL0j9kmk6xA--/YXBwaWQ9aGlnaGxhbmRlcjt3PTEyODA7aD04NTMuMzMzMzMzMzMzMzMzNA--/https://s.yimg.com/uu/api/res/1.2/dpmOTPzl09bZBHg4oW_fbQ--~B/aD0xNjAwO3c9MjQwMDtzbT0xO2FwcGlkPXl0YWNoeW9u/https://media.zenfs.com/en/techcrunch_350/fdd86883de4d0521dee321ad71419ba2",
16 | publishedAt: "2020-09-14T23:24:13Z",
17 | content:
18 | "When COVID-19 spread to the United States, the pandemic exposed two conflicting realities: a healthcare system that excels at high-cost, complex treatments, while failing to provide sufficient access… [+3229 chars]",
19 | },
20 | {
21 | source: {
22 | id: "techcrunch",
23 | name: "TechCrunch",
24 | },
25 | author: "Kirsten Korosec",
26 | title:
27 | "Carbon Health and Color founders see power in bringing healthcare to the edge",
28 | description:
29 | "When COVID-19 spread to the United States, the pandemic exposed two conflicting realities: a healthcare system that excels at high-cost, complex treatments, while failing to provide sufficient access at the local level. That lack of access to public health in…",
30 | url:
31 | "http://techcrunch.com/2020/09/14/carbon-health-and-color-founders-see-power-in-bringing-healthcare-to-the-edge/",
32 | urlToImage:
33 | "https://techcrunch.com/wp-content/uploads/2020/09/carbon-health-covid-pop-up.jpg?w=600",
34 | publishedAt: "2020-09-14T23:24:13Z",
35 | content:
36 | "When COVID-19 spread to the United States, the pandemic exposed two conflicting realities: a healthcare system that excels at high-cost, complex treatments, while failing to provide sufficient access… [+3229 chars]",
37 | },
38 | {
39 | source: {
40 | id: "techcrunch",
41 | name: "TechCrunch",
42 | },
43 | author: "Devin Coldewey",
44 | title: "N95 masks could soon be rechargeable instead of disposable",
45 | description:
46 | "The pandemic has led to N95 masks quickly becoming one of the world’s most sought-after resources as essential workers burned through billions of them. New research could lead to an N95 that you can recharge rather than throw away — or even one that continuou…",
47 | url:
48 | "http://techcrunch.com/2020/09/14/n95-masks-could-soon-be-rechargeable-instead-of-disposable/",
49 | urlToImage:
50 | "https://techcrunch.com/wp-content/uploads/2020/04/GettyImages-1209223365.jpg?w=600",
51 | publishedAt: "2020-09-14T22:56:32Z",
52 | content:
53 | "The pandemic has led to N95 masks quickly becoming one of the world’s most sought-after resources as essential workers burned through billions of them. New research could lead to an N95 that you can … [+3185 chars]",
54 | },
55 | {
56 | source: {
57 | id: "techcrunch",
58 | name: "TechCrunch",
59 | },
60 | author: "Devin Coldewey",
61 | title: "N95 masks could soon be rechargeable instead of disposable",
62 | description:
63 | "The pandemic has led to N95 masks quickly becoming one of the world’s most sought-after resources as essential workers burned through billions of them. New research could lead to an N95 that you can recharge rather than throw away — or even one that continuou…",
64 | url:
65 | "http://techcrunch.com/2020/09/14/n95-masks-could-soon-be-rechargeable-instead-of-disposable/",
66 | urlToImage:
67 | "https://techcrunch.com/wp-content/uploads/2020/04/GettyImages-1209223365.jpg?w=600",
68 | publishedAt: "2020-09-14T22:56:32Z",
69 | content:
70 | "The pandemic has led to N95 masks quickly becoming one of the world’s most sought-after resources as essential workers burned through billions of them. New research could lead to an N95 that you can … [+3185 chars]",
71 | },
72 | {
73 | source: {
74 | id: "techcrunch",
75 | name: "TechCrunch",
76 | },
77 | author: "Devin Coldewey",
78 | title: "N95 masks could soon be rechargeable instead of disposable",
79 | description:
80 | "The pandemic has led to N95 masks quickly becoming one of the world's most sought-after resources as essential workers burned through billions of them. The proposed system, from researchers at Technion-IIT in Israel and the Tata Institute of Fundamental Resea…",
81 | url:
82 | "https://techcrunch.com/2020/09/14/n95-masks-could-soon-be-rechargeable-instead-of-disposable/",
83 | urlToImage:
84 | "https://s.yimg.com/ny/api/res/1.2/nvaCwFmdOKZIP_9xnKZsHw--/YXBwaWQ9aGlnaGxhbmRlcjt3PTEyODA7aD04NTMuMzMzMzMzMzMzMzMzNA--/https://s.yimg.com/uu/api/res/1.2/IeoyaTa65diHIFtUFvl4dQ--~B/aD0yNjY3O3c9NDAwMDtzbT0xO2FwcGlkPXl0YWNoeW9u/https://media.zenfs.com/en/techcrunch_350/9960373639a971f3543cdce7f66736e1",
85 | publishedAt: "2020-09-14T22:56:32Z",
86 | content:
87 | "The pandemic has led to N95 masks quickly becoming one of the world's most sought-after resources as essential workers burned through billions of them. New research could lead to an N95 that you can … [+3189 chars]",
88 | },
89 | {
90 | source: {
91 | id: "techcrunch",
92 | name: "TechCrunch",
93 | },
94 | author: "Kirsten Korosec",
95 | title:
96 | "SEC to investigate short seller’s claims against Nikola, report says",
97 | description:
98 | "The U.S. Securities and Exchange Commission is reportedly looking into claims that Nikola Corp. is involved in an alleged “intricate fraud,” the latest development in a controversy that erupted last week just days after GM took an 11% stake in the newly publi…",
99 | url:
100 | "http://techcrunch.com/2020/09/14/sec-to-investigate-short-sellers-claims-against-nikola-report-says/",
101 | urlToImage:
102 | "https://techcrunch.com/wp-content/uploads/2020/06/nikola_badger4.jpg?w=667",
103 | publishedAt: "2020-09-14T22:18:57Z",
104 | content:
105 | "The U.S. Securities and Exchange Commission is reportedly looking into claims that Nikola Corp. is involved in an alleged “intricate fraud,” the latest development in a controversy that erupted last … [+2321 chars]",
106 | },
107 | {
108 | source: {
109 | id: "techcrunch",
110 | name: "TechCrunch",
111 | },
112 | author: "Kirsten Korosec",
113 | title:
114 | "SEC to investigate short seller's claims against Nikola, report says",
115 | description:
116 | 'The U.S. Securities and Exchange Commission is reportedly looking into claims that Nikola Corp. is involved in an alleged "intricate fraud," the latest development in a controversy that erupted last week just days after GM took an 11% stake in the newly publi…',
117 | url:
118 | "https://techcrunch.com/2020/09/14/sec-to-investigate-short-sellers-claims-against-nikola-report-says/",
119 | urlToImage:
120 | "https://s.yimg.com/ny/api/res/1.2/O0XjKw3KKmLhlEI5xQL29w--/YXBwaWQ9aGlnaGxhbmRlcjt3PTEyODA7aD03Njg-/https://s.yimg.com/uu/api/res/1.2/UJNd2MW220DDLEQmRea8lg--~B/aD0zMDAwO3c9NTAwMDtzbT0xO2FwcGlkPXl0YWNoeW9u/https://media.zenfs.com/en/techcrunch_350/d05052c1040e054b2713ae4d2ac7aa94",
121 | publishedAt: "2020-09-14T22:18:57Z",
122 | content:
123 | 'The U.S. Securities and Exchange Commission is reportedly looking into claims that Nikola Corp. is involved in an alleged "intricate fraud," the latest development in a controversy that erupted last … [+2321 chars]',
124 | },
125 | {
126 | source: {
127 | id: "techcrunch",
128 | name: "TechCrunch",
129 | },
130 | author: "Ron Miller",
131 | title:
132 | "Airtable’s Howie Liu has no interest in exiting, even as the company’s valuation soars",
133 | description:
134 | "In the middle of a pandemic, Airtable, the low-code startup, has actually had an excellent year. Just the other day, the company announced it had raised $185 million on a whopping $2.585 billion valuation. It also announced some new features that take it from…",
135 | url:
136 | "http://techcrunch.com/2020/09/14/airtables-howie-liu-has-no-interest-in-exiting-even-as-the-companys-valuation-soars/",
137 | urlToImage:
138 | "https://techcrunch.com/wp-content/uploads/2019/02/46306736674_a2bd150e5f_k.jpg?w=600",
139 | publishedAt: "2020-09-14T22:12:57Z",
140 | content:
141 | "In the middle of a pandemic, Airtable, the low-code startup, has actually had an excellent year. Just the other day, the company announced it had raised $185 million on a whopping $2.585 billion valu… [+2931 chars]",
142 | },
143 | {
144 | source: {
145 | id: "techcrunch",
146 | name: "TechCrunch",
147 | },
148 | author: "Ron Miller",
149 | title:
150 | "Airtable's Howie Liu has no interest in exiting, even as the company's valuation soars",
151 | description:
152 | "Just the other day, the company announced it had raised $185 million on a whopping $2.585 billion valuation. Airtable CEO and co-founder Howie Liu was a guest today at TechCrunch Disrupt, where he was interviewed by TechCrunch News Editor Frederic Lardinois. …",
153 | url:
154 | "https://techcrunch.com/2020/09/14/airtables-howie-liu-has-no-interest-in-exiting-even-as-the-companys-valuation-soars/",
155 | urlToImage:
156 | "https://s.yimg.com/ny/api/res/1.2/j1xojLDobhMBkt216J7HoQ--/YXBwaWQ9aGlnaGxhbmRlcjt3PTEyODA7aD04NTMuMzMzMzMzMzMzMzMzNA--/https://s.yimg.com/uu/api/res/1.2/RyFlu3Me3ZpDIbDy_fzGxg--~B/aD0xMzY1O3c9MjA0ODthcHBpZD15dGFjaHlvbg--/https://media.zenfs.com/en/techcrunch_350/19328d41b5a64a978e5967aaf8472a49",
157 | publishedAt: "2020-09-14T22:12:57Z",
158 | content:
159 | "In the middle of a pandemic, Airtable, the low-code startup, has actually had an excellent year. Just the other day, the company announced it had raised $185 million on a whopping $2.585 billion valu… [+2931 chars]",
160 | },
161 | {
162 | source: {
163 | id: "techcrunch",
164 | name: "TechCrunch",
165 | },
166 | author: "Ron Miller",
167 | title:
168 | "Airtable’s Howie Liu has no interest in exiting, even as the company’s valuation soars",
169 | description:
170 | "In the middle of a pandemic, Airtable, the low-code startup, has actually had an excellent year. Just the other day, the company announced it had raised $185 million on a whopping $2.585 billion valuation. It also announced some new features that take it from…",
171 | url:
172 | "http://techcrunch.com/2020/09/14/airtables-howie-liu-has-no-interest-in-exiting-even-as-the-companys-valuation-soars/",
173 | urlToImage:
174 | "https://techcrunch.com/wp-content/uploads/2019/02/46306736674_a2bd150e5f_k.jpg?w=600",
175 | publishedAt: "2020-09-14T22:12:57Z",
176 | content:
177 | "In the middle of a pandemic, Airtable, the low-code startup, has actually had an excellent year. Just the other day, the company announced it had raised $185 million on a whopping $2.585 billion valu… [+2931 chars]",
178 | },
179 | {
180 | source: {
181 | id: "techcrunch",
182 | name: "TechCrunch",
183 | },
184 | author: "Taylor Hatmaker",
185 | title:
186 | "The Black List's Franklin Leonard on why picking winners doesn't mean making losers",
187 | description:
188 | "Tech and Hollywood don't cross-pollinate that often, but when it comes to Franklin Leonard's way of looking at things, maybe they should. Leonard is best known as the creator of the Black List, a curated collection of the most underrated screenplays of the ye…",
189 | url:
190 | "https://techcrunch.com/2020/09/14/franklin-leonard-black-list-disrupt-2020/",
191 | urlToImage:
192 | "https://s.yimg.com/ny/api/res/1.2/j.CWjBc5ns7NuktEegZmSg--/YXBwaWQ9aGlnaGxhbmRlcjt3PTEyODA7aD05MzkuNzMzMzMzMzMzMzMzMw--/https://s.yimg.com/uu/api/res/1.2/5byJlq29EOCUo5Tp4b6.1g--~B/aD0yOTM0O3c9Mzk5NjtzbT0xO2FwcGlkPXl0YWNoeW9u/https://media.zenfs.com/en/techcrunch_350/eea6f1c277cf9cac692a72ac81c2e2ac",
193 | publishedAt: "2020-09-14T21:09:51Z",
194 | content:
195 | "Tech and Hollywood don't cross-pollinate that often, but when it comes to Franklin Leonard's way of looking at things, maybe they should.\r\nLeonard is best known as the creator of the Black List, a cu… [+5699 chars]",
196 | },
197 | {
198 | source: {
199 | id: "techcrunch",
200 | name: "TechCrunch",
201 | },
202 | author: "Taylor Hatmaker",
203 | title:
204 | "The Black List’s Franklin Leonard on why picking winners doesn’t mean making losers",
205 | description:
206 | "Tech and Hollywood don’t cross-pollinate that often, but when it comes to Franklin Leonard’s way of looking at things, maybe they should. Leonard is best known as the creator of the Black List, a curated collection of the most underrated screenplays of the ye…",
207 | url:
208 | "http://techcrunch.com/2020/09/14/franklin-leonard-black-list-disrupt-2020/",
209 | urlToImage:
210 | "https://techcrunch.com/wp-content/uploads/2020/09/franklin-leonard-GettyImages-1125528295.jpg?w=545",
211 | publishedAt: "2020-09-14T21:09:51Z",
212 | content:
213 | "Tech and Hollywood don’t cross-pollinate that often, but when it comes to Franklin Leonard’s way of looking at things, maybe they should.\r\nLeonard is best known as the creator of the Black List, a cu… [+5446 chars]",
214 | },
215 | {
216 | source: {
217 | id: "techcrunch",
218 | name: "TechCrunch",
219 | },
220 | author: "Devin Coldewey",
221 | title:
222 | "Leaked memo excoriates Facebook’s ‘slapdash and haphazard’ response to global political manipulation",
223 | description:
224 | "A former Facebook data scientist dropped a detailed, damning memo on her last day there, calling the social network out for what she describes as an arbitrary, slow, and generally inadequate response to fake accounts and activity affecting politics worldwide.…",
225 | url:
226 | "http://techcrunch.com/2020/09/14/leaked-memo-excoriates-facebooks-slapdash-and-haphazard-response-to-global-political-manipulation/",
227 | urlToImage:
228 | "https://techcrunch.com/wp-content/uploads/2019/07/facebook-logo-down-glitch.jpg?w=753",
229 | publishedAt: "2020-09-14T20:53:10Z",
230 | content:
231 | "A former Facebook data scientist dropped a detailed, damning memo on her last day there, calling the social network out for what she describes as an arbitrary, slow, and generally inadequate response… [+3029 chars]",
232 | },
233 | {
234 | source: {
235 | id: "the-next-web",
236 | name: "The Next Web",
237 | },
238 | author: "Napier Lopez",
239 | title: "Google to launch Pixel 5, new Chromecast, and more on September 30",
240 | description:
241 | "It’s official: Google has begun sending press invites to a virtual hardware event taking place on September 30. The company isn’t being shy about what’s going to be announced either: We invite you to learn all aobut our new Chromecast, latest smart speaker an…",
242 | url:
243 | "https://thenextweb.com/plugged/2020/09/14/google-to-launch-pixel-5-new-chromecast-and-more-on-september-30/",
244 | urlToImage:
245 | "https://img-cdn.tnwcdn.com/image/plugged?filter_last=1&fit=1280%2C640&url=https%3A%2F%2Fcdn0.tnwcdn.com%2Fwp-content%2Fblogs.dir%2F1%2Ffiles%2F2020%2F09%2FSnag_5853e756.png&signature=b56d3009ec54f7eadc714515dfe53924",
246 | publishedAt: "2020-09-14T20:21:59Z",
247 | content:
248 | "Its official: Google has begun sending press invites to a virtual hardware event taking place on September 30. The company isnt being shy about whats going to be announced either:\r\nWe invite you to l… [+1074 chars]",
249 | },
250 | {
251 | source: {
252 | id: "techcrunch",
253 | name: "TechCrunch",
254 | },
255 | author: null,
256 | title: "Building Consumer Hardware in 2020",
257 | description:
258 | "“Hardware is hard,” as the saying goes. But has building a hardware company gotten any easier over the years? Is building a hardware company in 2020 a reasonable endeavor… or is it tougher than ever? Eric Migicovsky (Partner at Y Combinator, and founder of sm…",
259 | url: "https://techcrunch.com/video/building-consumer-hardware-in-2020/",
260 | urlToImage:
261 | "https://img.vidible.tv/prod/2020-09/14/5f5fd33aa4691e2b009980fd/5f5fd64732d2162817f09ced_o_U_v1.jpg?w=640&h=360",
262 | publishedAt: "2020-09-14T19:30:17Z",
263 | content: null,
264 | },
265 | {
266 | source: {
267 | id: "techcrunch",
268 | name: "TechCrunch",
269 | },
270 | author: "Ron Miller",
271 | title:
272 | "Quantum startup CEO suggests we are only five years away from a quantum desktop computer",
273 | description:
274 | "Today at TechCrunch Disrupt 2020, leaders from three quantum computing startups joined TechCrunch editor Frederic Lardinois to discuss the future of the technology. IonQ CEO and president Peter Chapman suggested we could be as little as five years away from a…",
275 | url:
276 | "http://techcrunch.com/2020/09/14/quantum-startup-ceo-suggests-we-are-only-five-years-away-from-a-quantum-desktop-computer/",
277 | urlToImage:
278 | "https://techcrunch.com/wp-content/uploads/2020/09/quantumspeakers1.jpg?w=710",
279 | publishedAt: "2020-09-14T19:29:18Z",
280 | content:
281 | "Today at TechCrunch Disrupt 2020, leaders from three quantum computing startups joined TechCrunch editor Frederic Lardinois to discuss the future of the technology. IonQ CEO and president Peter Chapm… [+3580 chars]",
282 | },
283 | {
284 | source: {
285 | id: "techcrunch",
286 | name: "TechCrunch",
287 | },
288 | author: "Ron Miller",
289 | title:
290 | "Quantum startup CEO suggests we are only five years away from a quantum desktop computer",
291 | description:
292 | "Today at TechCrunch Disrupt 2020, leaders from three quantum computing startups joined TechCrunch editor Frederic Lardinois to discuss the future of the technology. IonQ CEO and president Peter Chapman suggested we could be as little as five years away from a…",
293 | url:
294 | "https://techcrunch.com/2020/09/14/quantum-startup-ceo-suggests-we-are-only-five-years-away-from-a-quantum-desktop-computer/",
295 | urlToImage:
296 | "https://s.yimg.com/ny/api/res/1.2/dZfBHaEfrYLsjr36Uhahdg--/YXBwaWQ9aGlnaGxhbmRlcjt3PTEyODA7aD03MTMuNg--/https://s.yimg.com/uu/api/res/1.2/pHFDFU7mARKqliINsxesqg--~B/aD0xMjkzO3c9MjMxOTtzbT0xO2FwcGlkPXl0YWNoeW9u/https://media.zenfs.com/en/techcrunch_350/7768956c23052759b515e0b364bb5f40",
297 | publishedAt: "2020-09-14T19:29:18Z",
298 | content:
299 | "Today at TechCrunch Disrupt 2020, leaders from three quantum computing startups joined TechCrunch editor Frederic Lardinois to discuss the future of the technology. IonQ CEO and president Peter Chapm… [+3778 chars]",
300 | },
301 | {
302 | source: {
303 | id: "techcrunch",
304 | name: "TechCrunch",
305 | },
306 | author: "Danny Crichton",
307 | title:
308 | "As it heads for IPO, Palantir hires a chief accountant and gets approval from NYSE to trade",
309 | description:
310 | "After 17 years, Palantir is getting closer and closer to its public debut later this month. We’ve been covering different facets of the company’s direct listing process including concerns about its governance and how insiders are accelerating the sale of thei…",
311 | url: "http://techcrunch.com/2020/09/14/palantir-accountant-nyse/",
312 | urlToImage:
313 | "https://techcrunch.com/wp-content/uploads/2020/09/GettyImages-103399424.jpg?w=600",
314 | publishedAt: "2020-09-14T19:20:58Z",
315 | content:
316 | "After 17 years, Palantir is getting closer and closer to its public debut later this month. Weve been covering different facets of the companys direct listing process including concerns about its gov… [+3189 chars]",
317 | },
318 | {
319 | source: {
320 | id: "techcrunch",
321 | name: "TechCrunch",
322 | },
323 | author: "Danny Crichton",
324 | title:
325 | "As it heads for IPO, Palantir hires a chief accountant and gets approval from NYSE to trade",
326 | description:
327 | "After 17 years, Palantir is getting closer and closer to its public debut later this month. Now, we have several major updates from the company, courtesy of a third amended filing of the company’s S-1 to the SEC this afternoon. The first news is that Palantir…",
328 | url: "https://techcrunch.com/2020/09/14/palantir-accountant-nyse/",
329 | urlToImage:
330 | "https://s.yimg.com/ny/api/res/1.2/gRsO7gaM0mpl8pG3jggDgw--/YXBwaWQ9aGlnaGxhbmRlcjt3PTEyODA7aD04NTMuMzMzMzMzMzMzMzMzNA--/https://s.yimg.com/uu/api/res/1.2/jzCD10oisdIb0P_0moNl4g--~B/aD0zNDQ5O3c9NTE3MztzbT0xO2FwcGlkPXl0YWNoeW9u/https://media.zenfs.com/en/techcrunch_350/dc21b510b34ac4e2edc9b67951ced627",
331 | publishedAt: "2020-09-14T19:20:58Z",
332 | content:
333 | "After 17 years, Palantir is getting closer and closer to its public debut later this month. Weve been covering different facets of the companys direct listing process including concerns about its gov… [+3189 chars]",
334 | },
335 | {
336 | source: {
337 | id: "techcrunch",
338 | name: "TechCrunch",
339 | },
340 | author: "Alex Wilhelm",
341 | title: "Snowflake and JFrog raise IPO ranges as tech markets stay hot",
342 | description:
343 | "What market selloff? Despite last week’s market declines, two big IPOs are rolling ahead this week, with Snowflake and JFrog both boosting their IPO price ranges this morning. The jump in expected pricing means each IPO will likely raise more capital, valuing…",
344 | url:
345 | "http://techcrunch.com/2020/09/14/snowflake-and-jfrog-raise-ipo-ranges-as-tech-markets-stay-hot/",
346 | urlToImage:
347 | "https://techcrunch.com/wp-content/uploads/2019/10/GettyImages-1150825123.jpeg?w=600",
348 | publishedAt: "2020-09-14T19:20:43Z",
349 | content:
350 | "What market selloff?\r\nDespite last week’s market declines, two big IPOs are rolling ahead this week, with Snowflake and JFrog both boosting their IPO price ranges this morning. The jump in expected p… [+1157 chars]",
351 | },
352 |
353 | {
354 | source: {
355 | id: "cbs-news",
356 | name: "CBS News",
357 | },
358 | author: "Sarah Lynch Baldwin",
359 | title:
360 | 'Hurricane Sally could bring "historic" flooding to Gulf Coast - CBS News',
361 | description: "Forecasters warn of possible historic flooding.",
362 | url:
363 | "https://www.cbsnews.com/live-updates/hurricane-sally-gulf-coast-2020-09-15/",
364 | urlToImage:
365 | "https://cbsnews2.cbsistatic.com/hub/i/r/2020/09/15/613ad7b5-e929-4ce6-9e84-4470c116e3df/thumbnail/1200x630/462cc9ae3795ef212665628a82fdcb64/sally.jpg",
366 | publishedAt: "2020-09-15T16:17:00Z",
367 | content:
368 | 'Hurricane Sally is drifting north at a speed of about 2 to 3 mph – "the speed of a child in a candy shop," said John De Block of the National Weather Service.\r\nAs a result, the eye of the storm is go… [+868 chars]',
369 | },
370 | {
371 | source: {
372 | id: "cnn",
373 | name: "CNN",
374 | },
375 | author: "Jennifer Agiesta, CNN Polling Director",
376 | title:
377 | "CNN polls: North Carolina a tight race, while Biden leads in Wisconsin - CNN",
378 | description:
379 | "The race for the presidency is near even in North Carolina and Democratic nominee Joe Biden holds a lead over President Donald Trump in Wisconsin, according to new CNN polls conducted by SSRS in the battleground states.",
380 | url:
381 | "https://www.cnn.com/2020/09/15/politics/cnn-polls-wisconsin-north-carolina/index.html",
382 | urlToImage:
383 | "https://cdn.cnn.com/cnnnext/dam/assets/200911133241-trump-biden-split-0911-super-tease.jpg",
384 | publishedAt: "2020-09-15T16:01:00Z",
385 | content: null,
386 | },
387 | {
388 | source: {
389 | id: "polygon",
390 | name: "Polygon",
391 | },
392 | author: "Owen S. Good",
393 | title:
394 | "Report: Sony cuts PS5 production estimate, citing supply chain problems - Polygon",
395 | description:
396 | "Bloomberg reported Tuesday that problems in the manufacture of the PlayStation 5’s motherboard — with yields as low as 50 percent — have caused Sony to revise its production estimate of the PS5 downward to 11 million units made before March 31, 2021.",
397 | url:
398 | "https://www.polygon.com/2020/9/15/21437984/ps5-sales-production-estimate-sony-launch-numbers-playstation-5",
399 | urlToImage:
400 | "https://cdn.vox-cdn.com/thumbor/EQhmvXoswJLZL6gsQ0mz5DAn_b0=/0x38:1920x1043/fit-in/1200x630/cdn.vox-cdn.com/uploads/chorus_asset/file/20030792/ps5_console_logo.png",
401 | publishedAt: "2020-09-15T15:22:33Z",
402 | content:
403 | "Bloomberg reports Sony will make about 4 million fewer PlayStation 5 systems in its current fiscal year, a production cut attributed to a weakened supply chain that provides the consoles motherboard.… [+1206 chars]",
404 | },
405 | {
406 | source: {
407 | id: null,
408 | name: "CNET",
409 | },
410 | author: "Sean Keane",
411 | title:
412 | "The Apple Store is down, marking the unofficial start of Apple event day - CNET",
413 | description:
414 | "The company took its online store down before Tuesday's virtual event.",
415 | url:
416 | "https://www.cnet.com/news/apple-store-is-down-marking-unofficial-start-of-apple-event-day-september-2020/",
417 | urlToImage:
418 | "https://cnet3.cbsistatic.com/img/zlIBEkLUgbgbuv5HXR00egVp90w=/1200x630/2020/09/15/e60a0437-179e-4a9d-b979-1699b25dc1f9/screenshot-2020-09-15-at-11-01-52.png",
419 | publishedAt: "2020-09-15T15:08:00Z",
420 | content:
421 | "Apple is gearing up for its Sept. 15 event.\r\nApple Store/Screenshot by Sean Keane/CNET\r\nThis story is part of Apple Event, our full coverage of the latest news from Apple headquarters.\r\nIt begins... … [+1155 chars]",
422 | },
423 | {
424 | source: {
425 | id: "ars-technica",
426 | name: "Ars Technica",
427 | },
428 | author: "Ars Staff",
429 | title: "Apple's AirPods Pro are on sale for $199 today - Ars Technica",
430 | description:
431 | "Dealmaster also has deals on USB-C chargers, Ghost of Tsushima, and more.",
432 | url:
433 | "https://arstechnica.com/staff/2020/09/apple-airpods-pro-deal-best-price/",
434 | urlToImage:
435 | "https://cdn.arstechnica.net/wp-content/uploads/2020/09/dealmaster091520-760x380.jpg",
436 | publishedAt: "2020-09-15T15:06:00Z",
437 | content:
438 | "8 with 8 posters participating\r\nToday's Dealmaster is headlined by the best price we've seen to date for Apple's AirPods Pro, which are currently down to $199 at Amazon and Staples. While we've seen … [+8338 chars]",
439 | },
440 | {
441 | source: {
442 | id: null,
443 | name: "CNBC",
444 | },
445 | author: "Thomas Franck",
446 | title:
447 | "Pelosi blasts GOP 'skinny' deals, doubles down on call for large coronavirus stimulus package - CNBC",
448 | description:
449 | "House Speaker Nancy Pelosi said Tuesday morning that she remains opposed to Republican efforts to pass a smaller version of her party's stimulus plan.",
450 | url:
451 | "https://www.cnbc.com/2020/09/15/coronavirus-stimulus-update-pelosi-blasts-republican-skinny-deals.html",
452 | urlToImage:
453 | "https://image.cnbcfm.com/api/v1/image/106619602-1594918335110pel.jpg?v=1594918389",
454 | publishedAt: "2020-09-15T15:00:00Z",
455 | content:
456 | "House Speaker Nancy Pelosi said Tuesday morning that she remains opposed to Republican efforts to pass a smaller version of her party's coronavirus stimulus plan despite the looming 2020 election and… [+3392 chars]",
457 | },
458 | {
459 | source: {
460 | id: null,
461 | name: "CBS Sports",
462 | },
463 | author: "",
464 | title:
465 | "Fantasy Football Week 2 Waiver Wire: Injuries, surprises, breakouts will create mad dash for available talent - CBS Sports",
466 | description: "The top waiver targets and drops to consider for Week 2.",
467 | url:
468 | "https://www.cbssports.com/fantasy/football/news/fantasy-football-week-2-waiver-wire-injuries-surprises-breakouts-will-create-mad-dash-for-available-talent/",
469 | urlToImage:
470 | "https://sportshub.cbsistatic.com/i/r/2019/10/27/5d49d52a-187f-4e1b-9562-16fb3ff8369f/thumbnail/1200x675/b0d90085d39e6d015ca1cbc042168b05/benny-snell-1400.jpg",
471 | publishedAt: "2020-09-15T14:50:00Z",
472 | content:
473 | "Injuries were a major problem following Week 1. We had several players hurt prior to the games even starting, and then plenty of guys went down on the field. It's going to make the waiver wire extrem… [+6188 chars]",
474 | },
475 | {
476 | source: {
477 | id: null,
478 | name: "Page Six",
479 | },
480 | author: "Francesca Bacardi",
481 | title:
482 | "Chris Evans speaks out on his leaked penis pic: 'It's embarrassing' - Page Six",
483 | description: "He appeared on the “Tamron Hall Show” Tuesday morning.",
484 | url:
485 | "https://pagesix.com/2020/09/15/chris-evans-talks-his-leaked-penis-pic-its-embarrassing/",
486 | urlToImage:
487 | "https://pagesix.com/wp-content/uploads/sites/3/2017/04/664921498.jpg?quality=90&strip=all&w=1200",
488 | publishedAt: "2020-09-15T14:49:00Z",
489 | content:
490 | "Chris Evans is going to start thinking before he tweets.\r\nThe “Captain America” star, 39, appeared on “The Tamron Hall Show” Tuesday morning and addressed his accidentally leaked penis photo that wen… [+546 chars]",
491 | },
492 | {
493 | source: {
494 | id: "google-news",
495 | name: "Google News",
496 | },
497 | author: null,
498 | title: "The Mandalorian: Season 2 - Official Trailer - IGN",
499 | description: "Description for The Mandalorian: Season 2 - Official Trailer - IGN",
500 | url:
501 | "https://news.google.com/__i/rss/rd/articles/CBMiK2h0dHBzOi8vd3d3LnlvdXR1YmUuY29tL3dhdGNoP3Y9WmNLTXdQSE1lMWvSAQA?oc=5",
502 | urlToImage: "https://images.unsplash.com/photo-1599760253047-37df46f031d7?ixlib=rb-1.2.1&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=1080&fit=max",
503 | publishedAt: "2020-09-15T14:36:08Z",
504 | content: null,
505 | },
506 | {
507 | source: {
508 | id: "nfl-news",
509 | name: "NFL News",
510 | },
511 | author: null,
512 | title: "NFL Power Rankings, Week 2: Packers vault into top three - NFL.com",
513 | description:
514 | "After the opening week of the 2020 season, Dan Hanzus' NFL Power Rankings feature a whole bunch of movement, including a new team in the top three and some fresh hell at No. 32.",
515 | url:
516 | "https://www.nfl.com/news/nfl-power-rankings-week-2-packers-vault-into-top-three",
517 | urlToImage:
518 | "https://static.www.nfl.com/image/private/t_editorial_landscape_12_desktop/league/ziftkofg5chrt4r2ouat",
519 | publishedAt: "2020-09-15T14:18:00Z",
520 | content:
521 | "Previous rank:No. 8\r\nTake a bow, Aaron Rodgers. After an offseason in which the Packers drafted his presumed successor and many in the football cognoscenti decided his best football was already in th… [+522 chars]",
522 | },
523 | {
524 | source: {
525 | id: "cnn",
526 | name: "CNN",
527 | },
528 | author: "Christina Carrega, Mark Morales and Eric Levenson, CNN",
529 | title:
530 | "Louisville has settled Breonna Taylor's wrongful death lawsuit - CNN",
531 | description:
532 | "The city of Louisville, Kentucky, has settled a wrongful death lawsuit filed by the family of Breonna Taylor, the 26-year-old EMT killed by police six months ago. A source told CNN Tuesday the agreement was a multimillion dollar settlement.",
533 | url:
534 | "https://www.cnn.com/2020/09/15/us/breonna-taylor-louisville-settlement/index.html",
535 | urlToImage:
536 | "https://cdn.cnn.com/cnnnext/dam/assets/200512170612-01-louisville-emt-police-killed-super-tease.jpg",
537 | publishedAt: "2020-09-15T13:52:00Z",
538 | content: null,
539 | },
540 | {
541 | source: {
542 | id: null,
543 | name: "Golf Channel",
544 | },
545 | author: null,
546 | title:
547 | "Round 1 and Round 2 tee times for the U.S. Open at Winged Foot - Golf Channel",
548 | description:
549 | "Here's a look at the groupings and times for the opening two rounds at Winged Foot Golf Club, site of the 120th U.S. Open.",
550 | url:
551 | "https://www.golfchannel.com/news/round-1-and-round-2-tee-times-us-open-winged-foot",
552 | urlToImage:
553 | "https://www.golfchannel.com/sites/default/files/2020/09/15/wingedfoot_1920_usopen20_clubhouse_usopen_sign.jpg",
554 | publishedAt: "2020-09-15T13:44:00Z",
555 | content:
556 | "The USGA announced first- and second-round tee times for the 120th U.S. Open. Here's a look at the groupings and times for the opening two rounds at Winged Foot Golf Club.\r\n(All times EDT; (a)=amateu… [+5609 chars]",
557 | },
558 | {
559 | source: {
560 | id: "cnn",
561 | name: "CNN",
562 | },
563 | author: "Jack Guy, CNN Business",
564 | title:
565 | "John Boyega quits perfume brand Jo Malone after being replaced in Chinese commercial - CNN",
566 | description:
567 | "Actor John Boyega has ended his association with perfume brand Jo Malone after the company controversially cut him from a commercial for the Chinese market.",
568 | url:
569 | "https://www.cnn.com/2020/09/15/business/john-boyega-jo-malone-quit-scli-intl-gbr/index.html",
570 | urlToImage:
571 | "https://cdn.cnn.com/cnnnext/dam/assets/200915050055-john-boyega-quits-jo-malone-super-tease.jpg",
572 | publishedAt: "2020-09-15T13:20:00Z",
573 | content: null,
574 | },
575 | {
576 | source: {
577 | id: null,
578 | name: "CNBC",
579 | },
580 | author: "Natasha Turak",
581 | title:
582 | "The UAE has approved a Chinese-made coronavirus vaccine for emergency use - CNBC",
583 | description:
584 | "The vaccine, developed by China's Sinopham, will be given to the UAE's frontline workers",
585 | url:
586 | "https://www.cnbc.com/2020/09/15/the-uae-approves-a-chinese-made-coronavirus-vaccine-for-emergency-use-.html",
587 | urlToImage:
588 | "https://image.cnbcfm.com/api/v1/image/106543346-1589872841931gettyimages-1216170959.jpeg?v=1589876873",
589 | publishedAt: "2020-09-15T13:19:00Z",
590 | content:
591 | "A medical worker, wearing disposable gloves, measures the temperature of a man at a coronavirus drive-through screening center on April 1, 2020 in Abu Dhabi, United Arab Emirates.\r\nPARIS The United … [+2731 chars]",
592 | },
593 | {
594 | source: {
595 | id: null,
596 | name: "Cbslocal.com",
597 | },
598 | author: "CBS Pittsburgh",
599 | title:
600 | "University Of Pittsburgh Scientists Discover Biomolecule That May Neutralize Coronavirus - CBS Pittsburgh",
601 | description:
602 | 'Pitt scientists have isolated a biomolecule that "completely and specifically" neutralizes the virus that causes coronavirus.',
603 | url:
604 | "https://pittsburgh.cbslocal.com/2020/09/15/coronavirus-university-pittsburgh-biomolecule-neutralize/",
605 | urlToImage:
606 | "https://pittsburgh.cbslocal.com/wp-content/uploads/sites/15909642/2020/05/Coronavirus-1024x576-1.jpg?w=1024",
607 | publishedAt: "2020-09-15T13:05:00Z",
608 | content:
609 | "By: KDKA-TV News Staff\r\nPITTSBURGH (KDKA) — University of Pittsburgh scientists have isolated a biomolecule that “completely and specifically” neutralizes the virus that causes coronavirus.\r\nUniversi… [+1092 chars]",
610 | },
611 | {
612 | source: {
613 | id: null,
614 | name: "Lifehacker.com",
615 | },
616 | author: "Brendan Hesse",
617 | title: "When You Shouldn't Repair Your Mac - Lifehacker",
618 | description:
619 | "The point of hardware repairs is to ensure your devices remain usable and in good condition as long as possible, so you don’t have to spend hundreds or thousands of dollars on a new product. Spending a couple hundred dollars replacing a severely cracked MacBo…",
620 | url: "https://lifehacker.com/when-you-shouldnt-repair-your-mac-1845054208",
621 | urlToImage:
622 | "https://i.kinja-img.com/gawker-media/image/upload/c_fill,f_auto,fl_progressive,g_center,h_675,pg_1,q_80,w_1200/ivhupwzjmdul2zikokny.jpg",
623 | publishedAt: "2020-09-15T13:00:00Z",
624 | content:
625 | "The point of hardware repairs is to ensure your devices remain usable and in good condition as long as possible, so you dont have to spend hundreds or thousands of dollars on a new product. Spending … [+2468 chars]",
626 | },
627 | {
628 | source: {
629 | id: null,
630 | name: "Live Science",
631 | },
632 | author: "Peter Dockrill",
633 | title:
634 | "Eerily well-preserved 17th-century ship found in the dark waters of the Baltic Sea - Live Science",
635 | description: "",
636 | url: "https://www.livescience.com/17th-century-shipwreck-baltic-sea.html",
637 | urlToImage:
638 | "https://cdn.mos.cms.futurecdn.net/nsaPT8zyAEtwEP2ZzPFNFe-1200-80.jpg",
639 | publishedAt: "2020-09-15T12:41:00Z",
640 | content:
641 | "Divers from Finland have made an unexpected discovery while exploring the depths of the Baltic Sea, finding an incredibly well-preserved shipwreck dating back almost 400 years.\r\nVolunteer divers from… [+2957 chars]",
642 | },
643 | {
644 | source: {
645 | id: null,
646 | name: "New York Times",
647 | },
648 | author: "Rick Gladstone",
649 | title:
650 | "As U.N. Turns 75, the Celebration Is Muted by Calamity and Conflict - The New York Times",
651 | description:
652 | "The organization created in the wake of one world war was aimed at preventing another. But a celebration of its accomplishments has been overshadowed by a pandemic and rising world tensions.",
653 | url:
654 | "https://www.nytimes.com/2020/09/15/world/United-Nations-General-Assembly.html",
655 | urlToImage:
656 | "https://static01.nyt.com/images/2020/09/10/world/00nations-future1/00nations-future1-facebookJumbo.jpg",
657 | publishedAt: "2020-09-15T12:34:00Z",
658 | content:
659 | "But its basic structure gives little real power to the main body, the General Assembly, and the most to the World War II victors Britain, China, France, Russia and the United States with each wieldin… [+1391 chars]",
660 | },
661 | {
662 | source: {
663 | id: null,
664 | name: "CNBC",
665 | },
666 | author: "Sam Meredith",
667 | title:
668 | "‘This is Navalny. I miss you’: Putin critic shares photo from hospital bed after suspected poisoning - CNBC",
669 | description:
670 | "Russian opposition politician Alexei Navalny posted a photograph of himself surrounded by his family in a Berlin hospital.",
671 | url:
672 | "https://www.cnbc.com/2020/09/15/navalny-putin-critic-posts-photo-from-hospital-after-suspected-poisoning.html",
673 | urlToImage:
674 | "https://image.cnbcfm.com/api/v1/image/106702622-1600168049757-gettyimages-1204723505-359858075_1-5.jpeg?v=1600168139",
675 | publishedAt: "2020-09-15T11:36:00Z",
676 | content:
677 | "Russian opposition politician Alexei Navalny on Tuesday posted a photograph of himself sitting up in hospital, saying he has been able to breathe on his own, following his suspected poisoning with a … [+1000 chars]",
678 | },
679 | ];
680 |
--------------------------------------------------------------------------------
/src/react-app-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/src/serviceWorker.ts:
--------------------------------------------------------------------------------
1 | // This optional code is used to register a service worker.
2 | // register() is not called by default.
3 |
4 | // This lets the app load faster on subsequent visits in production, and gives
5 | // it offline capabilities. However, it also means that developers (and users)
6 | // will only see deployed updates on subsequent visits to a page, after all the
7 | // existing tabs open on the page have been closed, since previously cached
8 | // resources are updated in the background.
9 |
10 | // To learn more about the benefits of this model and instructions on how to
11 | // opt-in, read https://bit.ly/CRA-PWA
12 |
13 | const isLocalhost = Boolean(
14 | window.location.hostname === 'localhost' ||
15 | // [::1] is the IPv6 localhost address.
16 | window.location.hostname === '[::1]' ||
17 | // 127.0.0.0/8 are considered localhost for IPv4.
18 | window.location.hostname.match(
19 | /^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/
20 | )
21 | );
22 |
23 | type Config = {
24 | onSuccess?: (registration: ServiceWorkerRegistration) => void;
25 | onUpdate?: (registration: ServiceWorkerRegistration) => void;
26 | };
27 |
28 | export function register(config?: Config) {
29 | if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {
30 | // The URL constructor is available in all browsers that support SW.
31 | const publicUrl = new URL(
32 | process.env.PUBLIC_URL,
33 | window.location.href
34 | );
35 | if (publicUrl.origin !== window.location.origin) {
36 | // Our service worker won't work if PUBLIC_URL is on a different origin
37 | // from what our page is served on. This might happen if a CDN is used to
38 | // serve assets; see https://github.com/facebook/create-react-app/issues/2374
39 | return;
40 | }
41 |
42 | window.addEventListener('load', () => {
43 | const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;
44 |
45 | if (isLocalhost) {
46 | // This is running on localhost. Let's check if a service worker still exists or not.
47 | checkValidServiceWorker(swUrl, config);
48 |
49 | // Add some additional logging to localhost, pointing developers to the
50 | // service worker/PWA documentation.
51 | navigator.serviceWorker.ready.then(() => {
52 | console.log(
53 | 'This web app is being served cache-first by a service ' +
54 | 'worker. To learn more, visit https://bit.ly/CRA-PWA'
55 | );
56 | });
57 | } else {
58 | // Is not localhost. Just register service worker
59 | registerValidSW(swUrl, config);
60 | }
61 | });
62 | }
63 | }
64 |
65 | function registerValidSW(swUrl: string, config?: Config) {
66 | navigator.serviceWorker
67 | .register(swUrl)
68 | .then(registration => {
69 | registration.onupdatefound = () => {
70 | const installingWorker = registration.installing;
71 | if (installingWorker == null) {
72 | return;
73 | }
74 | installingWorker.onstatechange = () => {
75 | if (installingWorker.state === 'installed') {
76 | if (navigator.serviceWorker.controller) {
77 | // At this point, the updated precached content has been fetched,
78 | // but the previous service worker will still serve the older
79 | // content until all client tabs are closed.
80 | console.log(
81 | 'New content is available and will be used when all ' +
82 | 'tabs for this page are closed. See https://bit.ly/CRA-PWA.'
83 | );
84 |
85 | // Execute callback
86 | if (config && config.onUpdate) {
87 | config.onUpdate(registration);
88 | }
89 | } else {
90 | // At this point, everything has been precached.
91 | // It's the perfect time to display a
92 | // "Content is cached for offline use." message.
93 | console.log('Content is cached for offline use.');
94 |
95 | // Execute callback
96 | if (config && config.onSuccess) {
97 | config.onSuccess(registration);
98 | }
99 | }
100 | }
101 | };
102 | };
103 | })
104 | .catch(error => {
105 | console.error('Error during service worker registration:', error);
106 | });
107 | }
108 |
109 | function checkValidServiceWorker(swUrl: string, config?: Config) {
110 | // Check if the service worker can be found. If it can't reload the page.
111 | fetch(swUrl, {
112 | headers: { 'Service-Worker': 'script' }
113 | })
114 | .then(response => {
115 | // Ensure service worker exists, and that we really are getting a JS file.
116 | const contentType = response.headers.get('content-type');
117 | if (
118 | response.status === 404 ||
119 | (contentType != null && contentType.indexOf('javascript') === -1)
120 | ) {
121 | // No service worker found. Probably a different app. Reload the page.
122 | navigator.serviceWorker.ready.then(registration => {
123 | registration.unregister().then(() => {
124 | window.location.reload();
125 | });
126 | });
127 | } else {
128 | // Service worker found. Proceed as normal.
129 | registerValidSW(swUrl, config);
130 | }
131 | })
132 | .catch(() => {
133 | console.log(
134 | 'No internet connection found. App is running in offline mode.'
135 | );
136 | });
137 | }
138 |
139 | export function unregister() {
140 | if ('serviceWorker' in navigator) {
141 | navigator.serviceWorker.ready
142 | .then(registration => {
143 | registration.unregister();
144 | })
145 | .catch(error => {
146 | console.error(error.message);
147 | });
148 | }
149 | }
150 |
--------------------------------------------------------------------------------
/src/setupTests.ts:
--------------------------------------------------------------------------------
1 | // jest-dom adds custom jest matchers for asserting on DOM nodes.
2 | // allows you to do things like:
3 | // expect(element).toHaveTextContent(/react/i)
4 | // learn more: https://github.com/testing-library/jest-dom
5 | import '@testing-library/jest-dom/extend-expect';
6 |
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es5",
4 | "lib": [
5 | "dom",
6 | "dom.iterable",
7 | "esnext"
8 | ],
9 | "allowJs": true,
10 | "skipLibCheck": true,
11 | "esModuleInterop": true,
12 | "allowSyntheticDefaultImports": true,
13 | "strict": true,
14 | "forceConsistentCasingInFileNames": true,
15 | "module": "esnext",
16 | "moduleResolution": "node",
17 | "resolveJsonModule": true,
18 | "isolatedModules": true,
19 | "noEmit": true,
20 | "jsx": "react"
21 | },
22 | "include": [
23 | "src"
24 | ]
25 | }
26 |
--------------------------------------------------------------------------------