diff --git a/src/components/animations/Spinner.module.css b/src/components/animations/Spinner.module.css deleted file mode 100644 index 45e5181..0000000 --- a/src/components/animations/Spinner.module.css +++ /dev/null @@ -1,81 +0,0 @@ -.spinner { - color: official; - display: inline-block; - position: relative; - width: 80px; - height: 80px; -} -.spinner div { - transform-origin: 40px 40px; - animation: spinner 1.2s linear infinite; -} -.spinner div:after { - content: ' '; - display: block; - position: absolute; - top: 3px; - left: 37px; - width: 6px; - height: 18px; - border-radius: 20%; - background: #010101; -} -.spinner.white div:after { - background: #ffffff; -} -.spinner div:nth-child(1) { - transform: rotate(0deg); - animation-delay: -1.1s; -} -.spinner div:nth-child(2) { - transform: rotate(30deg); - animation-delay: -1s; -} -.spinner div:nth-child(3) { - transform: rotate(60deg); - animation-delay: -0.9s; -} -.spinner div:nth-child(4) { - transform: rotate(90deg); - animation-delay: -0.8s; -} -.spinner div:nth-child(5) { - transform: rotate(120deg); - animation-delay: -0.7s; -} -.spinner div:nth-child(6) { - transform: rotate(150deg); - animation-delay: -0.6s; -} -.spinner div:nth-child(7) { - transform: rotate(180deg); - animation-delay: -0.5s; -} -.spinner div:nth-child(8) { - transform: rotate(210deg); - animation-delay: -0.4s; -} -.spinner div:nth-child(9) { - transform: rotate(240deg); - animation-delay: -0.3s; -} -.spinner div:nth-child(10) { - transform: rotate(270deg); - animation-delay: -0.2s; -} -.spinner div:nth-child(11) { - transform: rotate(300deg); - animation-delay: -0.1s; -} -.spinner div:nth-child(12) { - transform: rotate(330deg); - animation-delay: 0s; -} -@keyframes spinner { - 0% { - opacity: 1; - } - 100% { - opacity: 0; - } -} diff --git a/src/components/animations/Spinner.tsx b/src/components/animations/Spinner.tsx deleted file mode 100644 index d6b58fe..0000000 --- a/src/components/animations/Spinner.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import { memo } from 'react'; - -import styles from './Spinner.module.css'; - -// From https://loading.io/css/ -function _Spinner({ white, classes }: { white?: boolean; classes?: string }) { - return ( -
(url: URL) {
if (waitTime > 0) await sleep(waitTime);
}
- const response = await fetchWithTimeout(url);
+ const response = await fetchWithTimeout(url.toString());
if (!response.ok) {
throw new Error(`Fetch response not okay: ${response.status}`);
}
diff --git a/src/utils/ssr.ts b/src/utils/ssr.ts
deleted file mode 100644
index 897d2c6..0000000
--- a/src/utils/ssr.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-import { useEffect, useState } from 'react';
-
-// Is the component server-side rendering or not
-export function useIsSsr() {
- const [isSsr, setIsSsr] = useState(true);
- useEffect(() => {
- setIsSsr(false);
- }, []);
- return isSsr;
-}
diff --git a/src/utils/timeout.ts b/src/utils/timeout.ts
deleted file mode 100644
index a0b66db..0000000
--- a/src/utils/timeout.ts
+++ /dev/null
@@ -1,41 +0,0 @@
-import { useCallback, useEffect, useRef } from 'react';
-
-// https://medium.com/javascript-in-plain-english/usetimeout-react-hook-3cc58b94af1f
-export const useTimeout = (
- callback: () => void,
- delay = 0, // in ms (default: immediately put into JS Event Queue)
-): (() => void) => {
- const timeoutIdRef = useRef