Skip to content

Commit

Permalink
added snapshot.jpg for seo
Browse files Browse the repository at this point in the history
  • Loading branch information
tanmaylaud committed Jul 27, 2020
1 parent 257043a commit b348a90
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 11 deletions.
Binary file removed public/demo-min.gif
Binary file not shown.
2 changes: 1 addition & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
property="og:description"
content="Track live count of confirmed and active cases,deaths and recoveries for every country in one place"
/>
<meta property="og:image" content="%PUBLIC_URL%/snapshot.png" />
<meta property="og:image" content="%PUBLIC_URL%/snapshot.jpg" />
<meta property="og:type" content="website" />
<meta property="og:site_name" content="COVID19 Cases Live Tracker" />
<meta title="Covid19 3D Globe Tracker by Tanmay" />
Expand Down
Binary file added public/snapshot.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed public/snapshot.png
Binary file not shown.
2 changes: 2 additions & 0 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ export default function App() {
total.push(GlobalCounts.totalRecoveries);
total.push(GlobalCounts.totalActive);
setTotals(total);
if (!GlobalCounts.set) window.location.reload();
}, 3000);
}, [GlobalCounts.set]);

return (
<React.Fragment>
<div id="globeViz"></div>
Expand Down
10 changes: 5 additions & 5 deletions src/Counter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ export function Counter({ count }: CounterProps) {
const [counter, setCounter] = useState(0);

useEffect(() => {
if (counter != count) {
if (count - count <= 200) setCounter(counter + 1);
if (count - counter <= 1000) setCounter(counter + 100);
else if (counter < 10000) setCounter(counter + 1000);
else setCounter(counter + 10000);
if (counter <= count) {
if (count - counter <= 200) setCounter(counter + 1);
else if (count - counter <= 1000) setCounter(counter + 100);
else if (count - counter <= 10000) setCounter(counter + 1000);
else setCounter(counter + 1000);
}
}, [counter]);

Expand Down
4 changes: 2 additions & 2 deletions src/Spinner.css
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@

@media only screen and (min-device-width: 320px) and (max-device-width: 750px) {
.spinner {
left: 35%;
top: 50%;
left: 33%;
top: 45%;
transform: translate(-50%, -50%);
}
}
Expand Down
4 changes: 1 addition & 3 deletions src/Spinner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ export function Spinner(props: { loaded: boolean }) {
return !props.loaded ? (
<div className="spinbody">
<div className="spinner"></div>
<p style={{ position: "absolute", left: "40%", bottom: "50px" }}>
Loading latest data...
</p>
<p style={{ position: "absolute", left: "40%", bottom: "50px" }}></p>
</div>
) : null;
}

0 comments on commit b348a90

Please sign in to comment.