Compare commits
No commits in common. "main" and "gh-pages" have entirely different histories.
23
.gitignore
vendored
|
|
@ -1,23 +0,0 @@
|
||||||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
|
||||||
|
|
||||||
# dependencies
|
|
||||||
/node_modules
|
|
||||||
/.pnp
|
|
||||||
.pnp.js
|
|
||||||
|
|
||||||
# testing
|
|
||||||
/coverage
|
|
||||||
|
|
||||||
# production
|
|
||||||
/build
|
|
||||||
|
|
||||||
# misc
|
|
||||||
.DS_Store
|
|
||||||
.env.local
|
|
||||||
.env.development.local
|
|
||||||
.env.test.local
|
|
||||||
.env.production.local
|
|
||||||
|
|
||||||
npm-debug.log*
|
|
||||||
yarn-debug.log*
|
|
||||||
yarn-error.log*
|
|
||||||
7
LICENSE
|
|
@ -1,7 +0,0 @@
|
||||||
Copyright © 2021 Mueez Khan
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
15
README.md
|
|
@ -1,15 +0,0 @@
|
||||||
# International Space Station Position SPA 🛰
|
|
||||||
|
|
||||||
[](https://rzmk.github.io/iss-position-spa)
|
|
||||||
|
|
||||||
Fetches the latitude and longitude of the International Space Station (ISS) every 2 seconds and displays the live position on a map with a progress bar.
|
|
||||||
|
|
||||||
## Technologies
|
|
||||||
|
|
||||||
- [React](https://reactjs.org/)
|
|
||||||
- [TailwindCSS](https://tailwindcss.com/)
|
|
||||||
- [wheretheiss.at](https://wheretheiss.at)
|
|
||||||
- [react-icons](https://github.com/react-icons/react-icons)
|
|
||||||
- [react-simple-maps](https://github.com/zcreativelabs/react-simple-maps)
|
|
||||||
- [uiGradients](https://uigradients.com/#VisionsofGrandeur)
|
|
||||||
- [GitHub Pages](https://pages.github.com/)
|
|
||||||
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 48 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
16
asset-manifest.json
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
{
|
||||||
|
"files": {
|
||||||
|
"main.css": "/iss-position-spa/static/css/main.2ab3824a.css",
|
||||||
|
"main.js": "/iss-position-spa/static/js/main.0b56c7d8.js",
|
||||||
|
"static/js/787.f54da110.chunk.js": "/iss-position-spa/static/js/787.f54da110.chunk.js",
|
||||||
|
"service-worker.js": "/iss-position-spa/service-worker.js",
|
||||||
|
"index.html": "/iss-position-spa/index.html",
|
||||||
|
"main.2ab3824a.css.map": "/iss-position-spa/static/css/main.2ab3824a.css.map",
|
||||||
|
"main.0b56c7d8.js.map": "/iss-position-spa/static/js/main.0b56c7d8.js.map",
|
||||||
|
"787.f54da110.chunk.js.map": "/iss-position-spa/static/js/787.f54da110.chunk.js.map"
|
||||||
|
},
|
||||||
|
"entrypoints": [
|
||||||
|
"static/css/main.2ab3824a.css",
|
||||||
|
"static/js/main.0b56c7d8.js"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
1
index.html
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>🚀</text></svg>"><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><title>ISS 🛰 Latitude & Longitude! 🌎</title><meta name="title" content="ISS 🛰 Latitude & Longitude! 🌎"><meta name="description" content="Live International Space Station (ISS) location data. Find out where the ISS is on a world map!"><meta property="og:type" content="website"><meta property="og:url" content="https://rzmk.github.io/iss-position-spa/"><meta property="og:title" content="ISS 🛰 Latitude & Longitude! 🌎"><meta property="og:description" content="Live International Space Station (ISS) location data. Find out where the ISS is on a world map!"><meta property="og:image" content="https://i.imgur.com/VPc9O5Y.png"><meta property="twitter:card" content="summary_large_image"><meta property="twitter:url" content="https://rzmk.github.io/iss-position-spa/"><meta property="twitter:title" content="ISS 🛰 Latitude & Longitude! 🌎"><meta property="twitter:description" content="Live International Space Station (ISS) location data. Find out where the ISS is on a world map!"><meta property="twitter:image" content="https://i.imgur.com/VPc9O5Y.png"><link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"><link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png"><link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png"><link rel="manifest" href="/iss-position-spa/manifest.json"/><link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5"><meta name="msapplication-TileColor" content="#2b5797"><meta name="theme-color" content="#ffffff"><title>ISS 🛰 Latitude & Longitude! 🌎</title><script defer="defer" src="/iss-position-spa/static/js/main.0b56c7d8.js"></script><link href="/iss-position-spa/static/css/main.2ab3824a.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
|
||||||
BIN
map-demo.gif
|
Before Width: | Height: | Size: 15 MiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 9.6 KiB After Width: | Height: | Size: 9.6 KiB |
28458
package-lock.json
generated
61
package.json
|
|
@ -1,61 +0,0 @@
|
||||||
{
|
|
||||||
"name": "iss-position-spa",
|
|
||||||
"homepage": "https://rzmk.github.io/iss-position-spa",
|
|
||||||
"version": "0.1.0",
|
|
||||||
"private": true,
|
|
||||||
"dependencies": {
|
|
||||||
"@testing-library/jest-dom": "^5.16.1",
|
|
||||||
"@testing-library/react": "^12.1.2",
|
|
||||||
"@testing-library/user-event": "^13.5.0",
|
|
||||||
"gh-pages": "^3.2.3",
|
|
||||||
"react": "^17.0.2",
|
|
||||||
"react-dom": "^17.0.2",
|
|
||||||
"react-icons": "^4.3.1",
|
|
||||||
"react-scripts": "5.0.0",
|
|
||||||
"react-simple-maps": "^2.3.0",
|
|
||||||
"web-vitals": "^2.1.2",
|
|
||||||
"workbox-background-sync": "^5.1.4",
|
|
||||||
"workbox-broadcast-update": "^5.1.4",
|
|
||||||
"workbox-cacheable-response": "^5.1.4",
|
|
||||||
"workbox-core": "^5.1.4",
|
|
||||||
"workbox-expiration": "^5.1.4",
|
|
||||||
"workbox-google-analytics": "^5.1.4",
|
|
||||||
"workbox-navigation-preload": "^5.1.4",
|
|
||||||
"workbox-precaching": "^5.1.4",
|
|
||||||
"workbox-range-requests": "^5.1.4",
|
|
||||||
"workbox-routing": "^5.1.4",
|
|
||||||
"workbox-strategies": "^5.1.4",
|
|
||||||
"workbox-streams": "^5.1.4"
|
|
||||||
},
|
|
||||||
"scripts": {
|
|
||||||
"start": "react-scripts start",
|
|
||||||
"build": "react-scripts build",
|
|
||||||
"test": "react-scripts test",
|
|
||||||
"eject": "react-scripts eject",
|
|
||||||
"predeploy": "npm run build",
|
|
||||||
"deploy": "gh-pages -d build"
|
|
||||||
},
|
|
||||||
"eslintConfig": {
|
|
||||||
"extends": [
|
|
||||||
"react-app",
|
|
||||||
"react-app/jest"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"browserslist": {
|
|
||||||
"production": [
|
|
||||||
">0.2%",
|
|
||||||
"not dead",
|
|
||||||
"not op_mini all"
|
|
||||||
],
|
|
||||||
"development": [
|
|
||||||
"last 1 chrome version",
|
|
||||||
"last 1 firefox version",
|
|
||||||
"last 1 safari version"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"autoprefixer": "^10.4.0",
|
|
||||||
"postcss": "^8.4.5",
|
|
||||||
"tailwindcss": "^3.0.7"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
module.exports = {
|
|
||||||
plugins: {
|
|
||||||
tailwindcss: {},
|
|
||||||
autoprefixer: {},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
@ -1,72 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8" />
|
|
||||||
<link rel="icon"
|
|
||||||
href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>🚀</text></svg>">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
||||||
<meta name="theme-color" content="#000000" />
|
|
||||||
<!-- Primary Meta Tags -->
|
|
||||||
<title>ISS 🛰 Latitude & Longitude! 🌎</title>
|
|
||||||
<meta name="title" content="ISS 🛰 Latitude & Longitude! 🌎">
|
|
||||||
<meta name="description"
|
|
||||||
content="Live International Space Station (ISS) location data. Find out where the ISS is on a world map!">
|
|
||||||
|
|
||||||
<!-- Open Graph / Facebook -->
|
|
||||||
<meta property="og:type" content="website">
|
|
||||||
<meta property="og:url" content="https://rzmk.github.io/iss-position-spa/">
|
|
||||||
<meta property="og:title" content="ISS 🛰 Latitude & Longitude! 🌎">
|
|
||||||
<meta property="og:description"
|
|
||||||
content="Live International Space Station (ISS) location data. Find out where the ISS is on a world map!">
|
|
||||||
<meta property="og:image" content="https://i.imgur.com/VPc9O5Y.png">
|
|
||||||
|
|
||||||
<!-- Twitter -->
|
|
||||||
<meta property="twitter:card" content="summary_large_image">
|
|
||||||
<meta property="twitter:url" content="https://rzmk.github.io/iss-position-spa/">
|
|
||||||
<meta property="twitter:title" content="ISS 🛰 Latitude & Longitude! 🌎">
|
|
||||||
<meta property="twitter:description"
|
|
||||||
content="Live International Space Station (ISS) location data. Find out where the ISS is on a world map!">
|
|
||||||
<meta property="twitter:image" content="https://i.imgur.com/VPc9O5Y.png">
|
|
||||||
|
|
||||||
<!-- PWA -->
|
|
||||||
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
|
|
||||||
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
|
|
||||||
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
|
|
||||||
<!--
|
|
||||||
manifest.json provides metadata used when your web app is installed on a
|
|
||||||
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
|
|
||||||
-->
|
|
||||||
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
|
|
||||||
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5">
|
|
||||||
<meta name="msapplication-TileColor" content="#2b5797">
|
|
||||||
<meta name="theme-color" content="#ffffff">
|
|
||||||
|
|
||||||
<!--
|
|
||||||
Notice the use of %PUBLIC_URL% in the tags above.
|
|
||||||
It will be replaced with the URL of the `public` folder during the build.
|
|
||||||
Only files inside the `public` folder can be referenced from the HTML.
|
|
||||||
|
|
||||||
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
|
|
||||||
work correctly both with client-side routing and a non-root public URL.
|
|
||||||
Learn how to configure a non-root public URL by running `npm run build`.
|
|
||||||
-->
|
|
||||||
<title>ISS 🛰 Latitude & Longitude! 🌎</title>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<noscript>You need to enable JavaScript to run this app.</noscript>
|
|
||||||
<div id="root"></div>
|
|
||||||
<!--
|
|
||||||
This HTML file is a template.
|
|
||||||
If you open it directly in the browser, you will see an empty page.
|
|
||||||
|
|
||||||
You can add webfonts, meta tags, or analytics to this file.
|
|
||||||
The build step will place the bundled scripts into the <body> tag.
|
|
||||||
|
|
||||||
To begin the development, run `npm start` or `yarn start`.
|
|
||||||
To create a production bundle, use `npm run build` or `yarn build`.
|
|
||||||
-->
|
|
||||||
</body>
|
|
||||||
|
|
||||||
</html>
|
|
||||||
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
2
service-worker.js
Normal file
1
service-worker.js.map
Normal file
52
src/App.css
|
|
@ -1,52 +0,0 @@
|
||||||
.App {
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.App-logo {
|
|
||||||
height: 40vmin;
|
|
||||||
pointer-events: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (prefers-reduced-motion: no-preference) {
|
|
||||||
.App-logo {
|
|
||||||
animation: App-logo-spin infinite 20s linear;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.App-header {
|
|
||||||
min-height: 100vh;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
font-size: calc(10px + 2vmin);
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
.App-link {
|
|
||||||
color: #61dafb;
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes App-logo-spin {
|
|
||||||
from {
|
|
||||||
transform: rotate(0deg);
|
|
||||||
}
|
|
||||||
to {
|
|
||||||
transform: rotate(360deg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Small only */
|
|
||||||
@media screen and (max-width: 65em) {
|
|
||||||
h1 + svg {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Medium and up */
|
|
||||||
@media screen and (min-width: 65em) {
|
|
||||||
h1 + svg {
|
|
||||||
display: block;
|
|
||||||
margin-bottom: -1.5em;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
53
src/App.js
|
|
@ -1,53 +0,0 @@
|
||||||
import React, { useState, useEffect } from "react";
|
|
||||||
import { AiFillGithub } from "react-icons/ai";
|
|
||||||
import Map from "./components/Map";
|
|
||||||
import Coordinates from "./components/Coordinates";
|
|
||||||
import ProgressBar from "./components/ProgressBar";
|
|
||||||
import "./App.css";
|
|
||||||
|
|
||||||
function App() {
|
|
||||||
const [longitude, setLongitude] = useState("");
|
|
||||||
const [latitude, setLatitude] = useState("");
|
|
||||||
const [progress, setProgress] = useState(0);
|
|
||||||
|
|
||||||
async function fetchISSData() {
|
|
||||||
// const resp = await fetch("#"); // debugging
|
|
||||||
const resp = await fetch(
|
|
||||||
"https://api.wheretheiss.at/v1/satellites/25544"
|
|
||||||
);
|
|
||||||
const data = await resp.json();
|
|
||||||
setLongitude(String(data.longitude));
|
|
||||||
setLatitude(String(data.latitude));
|
|
||||||
setProgress(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
fetchISSData();
|
|
||||||
setInterval(fetchISSData, 2000);
|
|
||||||
setInterval(() => {
|
|
||||||
setProgress((prev) => prev + 5);
|
|
||||||
}, 100);
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div className="App">
|
|
||||||
<header className="App-header">
|
|
||||||
<h1 className="text-4xl sm:text-6xl">
|
|
||||||
International Space Station Position
|
|
||||||
</h1>
|
|
||||||
<Map latitude={latitude} longitude={longitude} />
|
|
||||||
<Coordinates latitude={latitude} longitude={longitude} />
|
|
||||||
<ProgressBar progress={progress} />
|
|
||||||
<a
|
|
||||||
href="https://github.com/rzmk/iss-position-spa"
|
|
||||||
target="_blank"
|
|
||||||
rel="noreferrer"
|
|
||||||
>
|
|
||||||
<AiFillGithub className="mt-8 w-12 h-12 hover:scale-125 transition ease-in-out" />
|
|
||||||
</a>
|
|
||||||
</header>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export default App;
|
|
||||||
|
|
@ -1,33 +0,0 @@
|
||||||
import React, { useState, useEffect } from "react";
|
|
||||||
function Coordinates({ latitude, longitude }) {
|
|
||||||
const [smallScreen, setSmallScreen] = useState(false);
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
if (window.screen.width < 480) setSmallScreen(true);
|
|
||||||
else setSmallScreen(false);
|
|
||||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
||||||
}, [window.screen.width]);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div>
|
|
||||||
<table className="my-8 text-3xl sm:text-4xl">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td className="text-left">Latitude:</td>
|
|
||||||
<td className="text-right">
|
|
||||||
{smallScreen ? latitude.slice(0, 7) : latitude}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td className="text-left">Longitude:</td>
|
|
||||||
<td className="text-right pl-10">
|
|
||||||
{smallScreen ? longitude.slice(0, 7) : longitude}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export default Coordinates;
|
|
||||||
|
|
@ -1,45 +0,0 @@
|
||||||
import React from "react";
|
|
||||||
import { FaSatellite } from "react-icons/fa";
|
|
||||||
import {
|
|
||||||
ComposableMap,
|
|
||||||
Geographies,
|
|
||||||
Geography,
|
|
||||||
Graticule,
|
|
||||||
Marker,
|
|
||||||
Sphere,
|
|
||||||
} from "react-simple-maps";
|
|
||||||
import jsonData from "./map-image.json"
|
|
||||||
|
|
||||||
const Map = ({ latitude, longitude }) => {
|
|
||||||
// Icon alignment offset fix
|
|
||||||
const newLong = String(Number(longitude) - 2.7);
|
|
||||||
const newLat = String(Number(latitude) + 5);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<ComposableMap projection="geoEqualEarth" width={2400}>
|
|
||||||
<Graticule stroke="rgba(255, 255, 255, 0.5)" />
|
|
||||||
<Sphere stroke="#FF5533" strokeWidth={2} />
|
|
||||||
<Geographies geography={jsonData}>
|
|
||||||
{({ geographies }) =>
|
|
||||||
geographies.map((geo) => (
|
|
||||||
<Geography
|
|
||||||
key={geo.rsmKey}
|
|
||||||
geography={geo}
|
|
||||||
fill="#DDD"
|
|
||||||
stroke="#FFF"
|
|
||||||
/>
|
|
||||||
))
|
|
||||||
}
|
|
||||||
</Geographies>
|
|
||||||
<Marker coordinates={[newLong, newLat]}>
|
|
||||||
<FaSatellite color="red" />
|
|
||||||
</Marker>
|
|
||||||
{/* Debug for exact coordinates comparison to above
|
|
||||||
<Marker coordinates={[longitude, latitude]}>
|
|
||||||
<circle r={8} stroke="red" stroke-width={2} fill="white" />
|
|
||||||
</Marker> */}
|
|
||||||
</ComposableMap>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default Map;
|
|
||||||
|
|
@ -1,14 +0,0 @@
|
||||||
const ProgressBar = ({ progress }) => {
|
|
||||||
return (
|
|
||||||
<div className="w-1/4">
|
|
||||||
<div className="w-full bg-gray-600 rounded-full h-4 dark:bg-gray-500">
|
|
||||||
<div
|
|
||||||
className="bg-gray-200 h-4 rounded-full transition-all ease-in-out"
|
|
||||||
style={{ width: `${progress}%`, maxWidth: "100%" }}
|
|
||||||
></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default ProgressBar;
|
|
||||||
|
|
@ -1,29 +0,0 @@
|
||||||
@tailwind base;
|
|
||||||
@tailwind components;
|
|
||||||
@tailwind utilities;
|
|
||||||
|
|
||||||
body {
|
|
||||||
margin: 0;
|
|
||||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto",
|
|
||||||
"Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans",
|
|
||||||
"Helvetica Neue", sans-serif;
|
|
||||||
-webkit-font-smoothing: antialiased;
|
|
||||||
-moz-osx-font-smoothing: grayscale;
|
|
||||||
background: #000046; /* fallback for old browsers */
|
|
||||||
background: #000046; /* fallback for old browsers */
|
|
||||||
background: -webkit-linear-gradient(
|
|
||||||
to right,
|
|
||||||
#1cb5e0,
|
|
||||||
#000046
|
|
||||||
); /* Chrome 10-25, Safari 5.1-6 */
|
|
||||||
background: linear-gradient(
|
|
||||||
to right,
|
|
||||||
#1cb5e0,
|
|
||||||
#000046
|
|
||||||
); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
|
|
||||||
}
|
|
||||||
|
|
||||||
code {
|
|
||||||
font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New",
|
|
||||||
monospace;
|
|
||||||
}
|
|
||||||
23
src/index.js
|
|
@ -1,23 +0,0 @@
|
||||||
import React from "react";
|
|
||||||
import ReactDOM from "react-dom";
|
|
||||||
import "./index.css";
|
|
||||||
import App from "./App";
|
|
||||||
import * as serviceWorkerRegistration from "./serviceWorkerRegistration";
|
|
||||||
import reportWebVitals from "./reportWebVitals";
|
|
||||||
|
|
||||||
ReactDOM.render(
|
|
||||||
<React.StrictMode>
|
|
||||||
<App />
|
|
||||||
</React.StrictMode>,
|
|
||||||
document.getElementById("root")
|
|
||||||
);
|
|
||||||
|
|
||||||
// If you want your app to work offline and load faster, you can change
|
|
||||||
// unregister() to register() below. Note this comes with some pitfalls.
|
|
||||||
// Learn more about service workers: https://cra.link/PWA
|
|
||||||
serviceWorkerRegistration.register();
|
|
||||||
|
|
||||||
// If you want to start measuring performance in your app, pass a function
|
|
||||||
// to log results (for example: reportWebVitals(console.log))
|
|
||||||
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
|
|
||||||
reportWebVitals();
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
const reportWebVitals = onPerfEntry => {
|
|
||||||
if (onPerfEntry && onPerfEntry instanceof Function) {
|
|
||||||
import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
|
|
||||||
getCLS(onPerfEntry);
|
|
||||||
getFID(onPerfEntry);
|
|
||||||
getFCP(onPerfEntry);
|
|
||||||
getLCP(onPerfEntry);
|
|
||||||
getTTFB(onPerfEntry);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
export default reportWebVitals;
|
|
||||||
|
|
@ -1,72 +0,0 @@
|
||||||
/* eslint-disable no-restricted-globals */
|
|
||||||
|
|
||||||
// This service worker can be customized!
|
|
||||||
// See https://developers.google.com/web/tools/workbox/modules
|
|
||||||
// for the list of available Workbox modules, or add any other
|
|
||||||
// code you'd like.
|
|
||||||
// You can also remove this file if you'd prefer not to use a
|
|
||||||
// service worker, and the Workbox build step will be skipped.
|
|
||||||
|
|
||||||
import { clientsClaim } from 'workbox-core';
|
|
||||||
import { ExpirationPlugin } from 'workbox-expiration';
|
|
||||||
import { precacheAndRoute, createHandlerBoundToURL } from 'workbox-precaching';
|
|
||||||
import { registerRoute } from 'workbox-routing';
|
|
||||||
import { StaleWhileRevalidate } from 'workbox-strategies';
|
|
||||||
|
|
||||||
clientsClaim();
|
|
||||||
|
|
||||||
// Precache all of the assets generated by your build process.
|
|
||||||
// Their URLs are injected into the manifest variable below.
|
|
||||||
// This variable must be present somewhere in your service worker file,
|
|
||||||
// even if you decide not to use precaching. See https://cra.link/PWA
|
|
||||||
precacheAndRoute(self.__WB_MANIFEST);
|
|
||||||
|
|
||||||
// Set up App Shell-style routing, so that all navigation requests
|
|
||||||
// are fulfilled with your index.html shell. Learn more at
|
|
||||||
// https://developers.google.com/web/fundamentals/architecture/app-shell
|
|
||||||
const fileExtensionRegexp = new RegExp('/[^/?]+\\.[^/]+$');
|
|
||||||
registerRoute(
|
|
||||||
// Return false to exempt requests from being fulfilled by index.html.
|
|
||||||
({ request, url }) => {
|
|
||||||
// If this isn't a navigation, skip.
|
|
||||||
if (request.mode !== 'navigate') {
|
|
||||||
return false;
|
|
||||||
} // If this is a URL that starts with /_, skip.
|
|
||||||
|
|
||||||
if (url.pathname.startsWith('/_')) {
|
|
||||||
return false;
|
|
||||||
} // If this looks like a URL for a resource, because it contains // a file extension, skip.
|
|
||||||
|
|
||||||
if (url.pathname.match(fileExtensionRegexp)) {
|
|
||||||
return false;
|
|
||||||
} // Return true to signal that we want to use the handler.
|
|
||||||
|
|
||||||
return true;
|
|
||||||
},
|
|
||||||
createHandlerBoundToURL(process.env.PUBLIC_URL + '/index.html')
|
|
||||||
);
|
|
||||||
|
|
||||||
// An example runtime caching route for requests that aren't handled by the
|
|
||||||
// precache, in this case same-origin .png requests like those from in public/
|
|
||||||
registerRoute(
|
|
||||||
// Add in any other file extensions or routing criteria as needed.
|
|
||||||
({ url }) => url.origin === self.location.origin && url.pathname.endsWith('.png'), // Customize this strategy as needed, e.g., by changing to CacheFirst.
|
|
||||||
new StaleWhileRevalidate({
|
|
||||||
cacheName: 'images',
|
|
||||||
plugins: [
|
|
||||||
// Ensure that once this runtime cache reaches a maximum size the
|
|
||||||
// least-recently used images are removed.
|
|
||||||
new ExpirationPlugin({ maxEntries: 50 }),
|
|
||||||
],
|
|
||||||
})
|
|
||||||
);
|
|
||||||
|
|
||||||
// This allows the web app to trigger skipWaiting via
|
|
||||||
// registration.waiting.postMessage({type: 'SKIP_WAITING'})
|
|
||||||
self.addEventListener('message', (event) => {
|
|
||||||
if (event.data && event.data.type === 'SKIP_WAITING') {
|
|
||||||
self.skipWaiting();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// Any other custom service worker logic can go here.
|
|
||||||
|
|
@ -1,137 +0,0 @@
|
||||||
// This optional code is used to register a service worker.
|
|
||||||
// register() is not called by default.
|
|
||||||
|
|
||||||
// This lets the app load faster on subsequent visits in production, and gives
|
|
||||||
// it offline capabilities. However, it also means that developers (and users)
|
|
||||||
// will only see deployed updates on subsequent visits to a page, after all the
|
|
||||||
// existing tabs open on the page have been closed, since previously cached
|
|
||||||
// resources are updated in the background.
|
|
||||||
|
|
||||||
// To learn more about the benefits of this model and instructions on how to
|
|
||||||
// opt-in, read https://cra.link/PWA
|
|
||||||
|
|
||||||
const isLocalhost = Boolean(
|
|
||||||
window.location.hostname === 'localhost' ||
|
|
||||||
// [::1] is the IPv6 localhost address.
|
|
||||||
window.location.hostname === '[::1]' ||
|
|
||||||
// 127.0.0.0/8 are considered localhost for IPv4.
|
|
||||||
window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/)
|
|
||||||
);
|
|
||||||
|
|
||||||
export function register(config) {
|
|
||||||
if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {
|
|
||||||
// The URL constructor is available in all browsers that support SW.
|
|
||||||
const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);
|
|
||||||
if (publicUrl.origin !== window.location.origin) {
|
|
||||||
// Our service worker won't work if PUBLIC_URL is on a different origin
|
|
||||||
// from what our page is served on. This might happen if a CDN is used to
|
|
||||||
// serve assets; see https://github.com/facebook/create-react-app/issues/2374
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
window.addEventListener('load', () => {
|
|
||||||
const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;
|
|
||||||
|
|
||||||
if (isLocalhost) {
|
|
||||||
// This is running on localhost. Let's check if a service worker still exists or not.
|
|
||||||
checkValidServiceWorker(swUrl, config);
|
|
||||||
|
|
||||||
// Add some additional logging to localhost, pointing developers to the
|
|
||||||
// service worker/PWA documentation.
|
|
||||||
navigator.serviceWorker.ready.then(() => {
|
|
||||||
console.log(
|
|
||||||
'This web app is being served cache-first by a service ' +
|
|
||||||
'worker. To learn more, visit https://cra.link/PWA'
|
|
||||||
);
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
// Is not localhost. Just register service worker
|
|
||||||
registerValidSW(swUrl, config);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function registerValidSW(swUrl, config) {
|
|
||||||
navigator.serviceWorker
|
|
||||||
.register(swUrl)
|
|
||||||
.then((registration) => {
|
|
||||||
registration.onupdatefound = () => {
|
|
||||||
const installingWorker = registration.installing;
|
|
||||||
if (installingWorker == null) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
installingWorker.onstatechange = () => {
|
|
||||||
if (installingWorker.state === 'installed') {
|
|
||||||
if (navigator.serviceWorker.controller) {
|
|
||||||
// At this point, the updated precached content has been fetched,
|
|
||||||
// but the previous service worker will still serve the older
|
|
||||||
// content until all client tabs are closed.
|
|
||||||
console.log(
|
|
||||||
'New content is available and will be used when all ' +
|
|
||||||
'tabs for this page are closed. See https://cra.link/PWA.'
|
|
||||||
);
|
|
||||||
|
|
||||||
// Execute callback
|
|
||||||
if (config && config.onUpdate) {
|
|
||||||
config.onUpdate(registration);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// At this point, everything has been precached.
|
|
||||||
// It's the perfect time to display a
|
|
||||||
// "Content is cached for offline use." message.
|
|
||||||
console.log('Content is cached for offline use.');
|
|
||||||
|
|
||||||
// Execute callback
|
|
||||||
if (config && config.onSuccess) {
|
|
||||||
config.onSuccess(registration);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
};
|
|
||||||
})
|
|
||||||
.catch((error) => {
|
|
||||||
console.error('Error during service worker registration:', error);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function checkValidServiceWorker(swUrl, config) {
|
|
||||||
// Check if the service worker can be found. If it can't reload the page.
|
|
||||||
fetch(swUrl, {
|
|
||||||
headers: { 'Service-Worker': 'script' },
|
|
||||||
})
|
|
||||||
.then((response) => {
|
|
||||||
// Ensure service worker exists, and that we really are getting a JS file.
|
|
||||||
const contentType = response.headers.get('content-type');
|
|
||||||
if (
|
|
||||||
response.status === 404 ||
|
|
||||||
(contentType != null && contentType.indexOf('javascript') === -1)
|
|
||||||
) {
|
|
||||||
// No service worker found. Probably a different app. Reload the page.
|
|
||||||
navigator.serviceWorker.ready.then((registration) => {
|
|
||||||
registration.unregister().then(() => {
|
|
||||||
window.location.reload();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
// Service worker found. Proceed as normal.
|
|
||||||
registerValidSW(swUrl, config);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.catch(() => {
|
|
||||||
console.log('No internet connection found. App is running in offline mode.');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
export function unregister() {
|
|
||||||
if ('serviceWorker' in navigator) {
|
|
||||||
navigator.serviceWorker.ready
|
|
||||||
.then((registration) => {
|
|
||||||
registration.unregister();
|
|
||||||
})
|
|
||||||
.catch((error) => {
|
|
||||||
console.error(error.message);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
// jest-dom adds custom jest matchers for asserting on DOM nodes.
|
|
||||||
// allows you to do things like:
|
|
||||||
// expect(element).toHaveTextContent(/react/i)
|
|
||||||
// learn more: https://github.com/testing-library/jest-dom
|
|
||||||
import '@testing-library/jest-dom';
|
|
||||||
4
static/css/main.2ab3824a.css
Normal file
1
static/css/main.2ab3824a.css.map
Normal file
2
static/js/787.f54da110.chunk.js
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
"use strict";(self.webpackChunkiss_position_spa=self.webpackChunkiss_position_spa||[]).push([[787],{787:function(e,n,t){t.r(n),t.d(n,{getCLS:function(){return y},getFCP:function(){return g},getFID:function(){return C},getLCP:function(){return P},getTTFB:function(){return D}});var i,r,a,o,u=function(e,n){return{name:e,value:void 0===n?-1:n,delta:0,entries:[],id:"v2-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12)}},c=function(e,n){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){if("first-input"===e&&!("PerformanceEventTiming"in self))return;var t=new PerformanceObserver((function(e){return e.getEntries().map(n)}));return t.observe({type:e,buffered:!0}),t}}catch(e){}},s=function(e,n){var t=function t(i){"pagehide"!==i.type&&"hidden"!==document.visibilityState||(e(i),n&&(removeEventListener("visibilitychange",t,!0),removeEventListener("pagehide",t,!0)))};addEventListener("visibilitychange",t,!0),addEventListener("pagehide",t,!0)},f=function(e){addEventListener("pageshow",(function(n){n.persisted&&e(n)}),!0)},m=function(e,n,t){var i;return function(r){n.value>=0&&(r||t)&&(n.delta=n.value-(i||0),(n.delta||void 0===i)&&(i=n.value,e(n)))}},p=-1,v=function(){return"hidden"===document.visibilityState?0:1/0},d=function(){s((function(e){var n=e.timeStamp;p=n}),!0)},l=function(){return p<0&&(p=v(),d(),f((function(){setTimeout((function(){p=v(),d()}),0)}))),{get firstHiddenTime(){return p}}},g=function(e,n){var t,i=l(),r=u("FCP"),a=function(e){"first-contentful-paint"===e.name&&(s&&s.disconnect(),e.startTime<i.firstHiddenTime&&(r.value=e.startTime,r.entries.push(e),t(!0)))},o=window.performance&&performance.getEntriesByName&&performance.getEntriesByName("first-contentful-paint")[0],s=o?null:c("paint",a);(o||s)&&(t=m(e,r,n),o&&a(o),f((function(i){r=u("FCP"),t=m(e,r,n),requestAnimationFrame((function(){requestAnimationFrame((function(){r.value=performance.now()-i.timeStamp,t(!0)}))}))})))},h=!1,T=-1,y=function(e,n){h||(g((function(e){T=e.value})),h=!0);var t,i=function(n){T>-1&&e(n)},r=u("CLS",0),a=0,o=[],p=function(e){if(!e.hadRecentInput){var n=o[0],i=o[o.length-1];a&&e.startTime-i.startTime<1e3&&e.startTime-n.startTime<5e3?(a+=e.value,o.push(e)):(a=e.value,o=[e]),a>r.value&&(r.value=a,r.entries=o,t())}},v=c("layout-shift",p);v&&(t=m(i,r,n),s((function(){v.takeRecords().map(p),t(!0)})),f((function(){a=0,T=-1,r=u("CLS",0),t=m(i,r,n)})))},E={passive:!0,capture:!0},w=new Date,L=function(e,n){i||(i=n,r=e,a=new Date,F(removeEventListener),S())},S=function(){if(r>=0&&r<a-w){var e={entryType:"first-input",name:i.type,target:i.target,cancelable:i.cancelable,startTime:i.timeStamp,processingStart:i.timeStamp+r};o.forEach((function(n){n(e)})),o=[]}},b=function(e){if(e.cancelable){var n=(e.timeStamp>1e12?new Date:performance.now())-e.timeStamp;"pointerdown"==e.type?function(e,n){var t=function(){L(e,n),r()},i=function(){r()},r=function(){removeEventListener("pointerup",t,E),removeEventListener("pointercancel",i,E)};addEventListener("pointerup",t,E),addEventListener("pointercancel",i,E)}(n,e):L(n,e)}},F=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach((function(n){return e(n,b,E)}))},C=function(e,n){var t,a=l(),p=u("FID"),v=function(e){e.startTime<a.firstHiddenTime&&(p.value=e.processingStart-e.startTime,p.entries.push(e),t(!0))},d=c("first-input",v);t=m(e,p,n),d&&s((function(){d.takeRecords().map(v),d.disconnect()}),!0),d&&f((function(){var a;p=u("FID"),t=m(e,p,n),o=[],r=-1,i=null,F(addEventListener),a=v,o.push(a),S()}))},k={},P=function(e,n){var t,i=l(),r=u("LCP"),a=function(e){var n=e.startTime;n<i.firstHiddenTime&&(r.value=n,r.entries.push(e)),t()},o=c("largest-contentful-paint",a);if(o){t=m(e,r,n);var p=function(){k[r.id]||(o.takeRecords().map(a),o.disconnect(),k[r.id]=!0,t(!0))};["keydown","click"].forEach((function(e){addEventListener(e,p,{once:!0,capture:!0})})),s(p,!0),f((function(i){r=u("LCP"),t=m(e,r,n),requestAnimationFrame((function(){requestAnimationFrame((function(){r.value=performance.now()-i.timeStamp,k[r.id]=!0,t(!0)}))}))}))}},D=function(e){var n,t=u("TTFB");n=function(){try{var n=performance.getEntriesByType("navigation")[0]||function(){var e=performance.timing,n={entryType:"navigation",startTime:0};for(var t in e)"navigationStart"!==t&&"toJSON"!==t&&(n[t]=Math.max(e[t]-e.navigationStart,0));return n}();if(t.value=t.delta=n.responseStart,t.value<0||t.value>performance.now())return;t.entries=[n],e(t)}catch(e){}},"complete"===document.readyState?setTimeout(n,0):addEventListener("pageshow",n)}}}]);
|
||||||
|
//# sourceMappingURL=787.f54da110.chunk.js.map
|
||||||
1
static/js/787.f54da110.chunk.js.map
Normal file
3
static/js/main.0b56c7d8.js
Normal file
41
static/js/main.0b56c7d8.js.LICENSE.txt
Normal file
|
|
@ -0,0 +1,41 @@
|
||||||
|
/*
|
||||||
|
object-assign
|
||||||
|
(c) Sindre Sorhus
|
||||||
|
@license MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @license React v0.20.2
|
||||||
|
* scheduler.production.min.js
|
||||||
|
*
|
||||||
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @license React v17.0.2
|
||||||
|
* react-dom.production.min.js
|
||||||
|
*
|
||||||
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @license React v17.0.2
|
||||||
|
* react-jsx-runtime.production.min.js
|
||||||
|
*
|
||||||
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** @license React v17.0.2
|
||||||
|
* react.production.min.js
|
||||||
|
*
|
||||||
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
*/
|
||||||
1
static/js/main.0b56c7d8.js.map
Normal file
|
|
@ -1,7 +0,0 @@
|
||||||
module.exports = {
|
|
||||||
content: ["./src/**/*.{js,jsx,ts,tsx}"],
|
|
||||||
theme: {
|
|
||||||
extend: {},
|
|
||||||
},
|
|
||||||
plugins: [],
|
|
||||||
};
|
|
||||||