From d4d11690583ad0a22a235441530c0bb0e1e994d9 Mon Sep 17 00:00:00 2001 From: keyan Date: Wed, 5 May 2021 13:13:14 -0500 Subject: [PATCH] small ui stuff --- components/comment.js | 8 ++----- components/comments.js | 6 +----- components/header.js | 29 +++++++++++++++++-------- components/invoice.js | 0 components/upvote.module.css | 1 - fragments/comments.js | 42 ++++++++++++++++++++++++++++++++++++ package.json | 1 + pages/fund.js | 9 ++++++++ pages/items/[id].js | 4 ++++ styles/globals.scss | 9 ++++++++ styles/post.module.css | 2 ++ yarn.lock | 16 +++++++++++++- 12 files changed, 105 insertions(+), 22 deletions(-) create mode 100644 components/invoice.js create mode 100644 pages/fund.js 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 () { <> -