remove .env

This commit is contained in:
cnrad
2022-05-11 22:38:40 -04:00
parent 4fb4c986f8
commit 849b92cd80
3 changed files with 3 additions and 5 deletions

1
.env
View File

@@ -1 +0,0 @@
REDIS_URL=redis://:cnredis7535@142.93.77.0:6379

1
.gitignore vendored
View File

@@ -1,4 +1,5 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
.env
# dependencies
/node_modules

View File

@@ -8,8 +8,8 @@ export default function Home({ userCount }: { userCount: number }) {
const [userId, setUserId] = useState<null | string>(null);
const [userError, setUserError] = useState<string>();
const [copyState, setCopyState] = useState("Copy");
const countRef = useRef<HTMLSpanElement | null>(null);
const countRef = useRef<HTMLSpanElement | null>(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%;
`;