diff --git a/components/comment.js b/components/comment.js index cf455fef..54855144 100644 --- a/components/comment.js +++ b/components/comment.js @@ -106,8 +106,6 @@ export default function Comment ({ item, children, replyOpen, includeParent, cac } export function CommentSkeleton ({ skeletonChildren }) { - const comments = skeletonChildren > 0 ? new Array(skeletonChildren).fill(null) : [] - return (
@@ -127,10 +125,8 @@ export function CommentSkeleton ({ skeletonChildren }) {
- {comments - ? comments.map((_, i) => ( - - )) + {skeletonChildren + ? : null}
diff --git a/components/comments.js b/components/comments.js index 233ddd0b..5b9cb8c3 100644 --- a/components/comments.js +++ b/components/comments.js @@ -8,11 +8,7 @@ export default function Comments ({ comments, ...props }) { } export function CommentsSkeleton () { - const comments = new Array(1).fill(null) - - return comments.map((_, i) => ( - - )) + return } export function CommentsQuery ({ query, ...props }) { diff --git a/components/header.js b/components/header.js index df00d546..f08d62c0 100644 --- a/components/header.js +++ b/components/header.js @@ -4,12 +4,13 @@ import Nav from 'react-bootstrap/Nav' import Link from 'next/link' import styles from './header.module.css' import { useRouter } from 'next/router' -import { Container, NavDropdown } from 'react-bootstrap' +import { Button, Container, NavDropdown } from 'react-bootstrap' import Price from './price' export default function Header () { const [session, loading] = useSession() const router = useRouter() + const path = router.asPath.split('?')[0] const Corner = () => { if (loading) { @@ -18,15 +19,25 @@ export default function Header () { if (session) { return ( - - - profile - - logout - +
+ + + profile + + + fund [0,0] + + logout + + + + [0,0] + + +
) } else { - return login + return path !== '/login' && } } @@ -34,7 +45,7 @@ export default function Header () { <> -