mirror of
https://github.com/NohamR/lanyard-profile-readme.git
synced 2026-05-26 12:45:08 +00:00
fix merge
This commit is contained in:
4
.gitignore
vendored
4
.gitignore
vendored
@@ -1,5 +1,9 @@
|
|||||||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
||||||
|
<<<<<<< HEAD
|
||||||
.env
|
.env
|
||||||
|
=======
|
||||||
|
.env
|
||||||
|
>>>>>>> 849b92cd803993724dce307821dd54ef20d0bee2
|
||||||
|
|
||||||
# dependencies
|
# dependencies
|
||||||
/node_modules
|
/node_modules
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ export default function Home({ userCount }: { userCount: number }) {
|
|||||||
const [userId, setUserId] = useState<null | string>(null);
|
const [userId, setUserId] = useState<null | string>(null);
|
||||||
const [userError, setUserError] = useState<string>();
|
const [userError, setUserError] = useState<string>();
|
||||||
const [copyState, setCopyState] = useState("Copy");
|
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 counter = useSmoothCount({ ref: countRef, target: userCount, duration: 3, curve: [0, 1, 0, 1] });
|
||||||
|
|
||||||
const copy = () => {
|
const copy = () => {
|
||||||
@@ -102,7 +102,7 @@ export async function getServerSideProps(ctx: any) {
|
|||||||
let userCount = await axios
|
let userCount = await axios
|
||||||
.get("https://lanyard.cnrad.dev/api/getUserCount", { timeout: 1000 })
|
.get("https://lanyard.cnrad.dev/api/getUserCount", { timeout: 1000 })
|
||||||
.then(res => res.data.count)
|
.then(res => res.data.count)
|
||||||
.catch(() => 0);
|
.catch(() => 1000);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
props: { userCount },
|
props: { userCount },
|
||||||
@@ -220,8 +220,6 @@ const ActionButton = styled.button`
|
|||||||
const Example = styled.img`
|
const Example = styled.img`
|
||||||
display: block;
|
display: block;
|
||||||
margin: 30px auto 0px;
|
margin: 30px auto 0px;
|
||||||
// border-radius: 0.7rem;
|
|
||||||
// border: solid 1px #333;
|
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user