diff --git a/.env b/.env deleted file mode 100644 index 139c928..0000000 --- a/.env +++ /dev/null @@ -1 +0,0 @@ -REDIS_URL=redis://:cnredis7535@142.93.77.0:6379 \ No newline at end of file diff --git a/.gitignore b/.gitignore index 1437c53..59c63a2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. +.env # dependencies /node_modules diff --git a/pages/index.tsx b/pages/index.tsx index c6fff71..9cb62c0 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -8,8 +8,8 @@ export default function Home({ userCount }: { userCount: number }) { const [userId, setUserId] = useState(null); const [userError, setUserError] = useState(); const [copyState, setCopyState] = useState("Copy"); - const countRef = useRef(null); + const countRef = useRef(null); const counter = useSmoothCount({ ref: countRef, target: userCount, duration: 3, curve: [0, 1, 0, 1] }); const copy = () => { @@ -101,7 +101,7 @@ export async function getServerSideProps(ctx: any) { let userCount = await axios .get("https://lanyard.cnrad.dev/api/getUserCount", { timeout: 1000 }) .then(res => res.data.count) - .catch(() => 0); + .catch(() => 1000); return { props: { userCount }, @@ -219,8 +219,6 @@ const ActionButton = styled.button` const Example = styled.img` display: block; margin: 30px auto 0px; - // border-radius: 0.7rem; - // border: solid 1px #333; max-width: 100%; `;