fix merge

This commit is contained in:
cnrad
2022-05-24 14:04:47 -04:00
3 changed files with 6 additions and 5 deletions

1
.env
View File

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

4
.gitignore vendored
View File

@@ -1,5 +1,9 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
<<<<<<< HEAD
.env
=======
.env
>>>>>>> 849b92cd803993724dce307821dd54ef20d0bee2
# 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<HTMLDivElement | null>(null);
const countRef = useRef<HTMLDivElement | null>(null);
const counter = useSmoothCount({ ref: countRef, target: userCount, duration: 3, curve: [0, 1, 0, 1] });
const copy = () => {
@@ -102,7 +102,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 },
@@ -220,8 +220,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%;
`;