diff --git a/web/components/create-question-button.tsx b/web/components/create-question-button.tsx index c7299904..20225b78 100644 --- a/web/components/create-question-button.tsx +++ b/web/components/create-question-button.tsx @@ -1,27 +1,13 @@ import React from 'react' import Link from 'next/link' -import clsx from 'clsx' - -import { User } from 'web/lib/firebase/users' import { Button } from './button' -export const CreateQuestionButton = (props: { - user: User | null | undefined - overrideText?: string - className?: string - query?: string -}) => { - const { user, overrideText, className, query } = props - - if (!user || user?.isBannedFromPosting) return <> - +export const CreateQuestionButton = () => { return ( -
- - - -
+ + + ) } diff --git a/web/components/nav/menu.tsx b/web/components/nav/menu.tsx index 07ee5c77..f61ebad9 100644 --- a/web/components/nav/menu.tsx +++ b/web/components/nav/menu.tsx @@ -19,12 +19,10 @@ export function MenuButton(props: { as="div" className={clsx(className ? className : 'relative z-40 flex-shrink-0')} > -
- - Open user menu - {buttonContent} - -
+ + Open user menu + {buttonContent} + diff --git a/web/components/nav/sidebar.tsx b/web/components/nav/sidebar.tsx index 1b030098..d7adfa28 100644 --- a/web/components/nav/sidebar.tsx +++ b/web/components/nav/sidebar.tsx @@ -234,11 +234,7 @@ export default function Sidebar(props: { className?: string }) { {!user && } - {user && ( -
- -
- )} + {user && } {/* Mobile navigation */}
@@ -255,7 +251,7 @@ export default function Sidebar(props: { className?: string }) {
{/* Desktop navigation */} -
+
{navigationOptions.map((item) => ( ))} @@ -264,7 +260,7 @@ export default function Sidebar(props: { className?: string }) { buttonContent={} /> - {user && } + {user && !user.isBannedFromPosting && }
) diff --git a/web/components/notifications-icon.tsx b/web/components/notifications-icon.tsx index 55284e96..2438fbed 100644 --- a/web/components/notifications-icon.tsx +++ b/web/components/notifications-icon.tsx @@ -12,11 +12,9 @@ export default function NotificationsIcon(props: { className?: string }) { const privateUser = usePrivateUser() return ( - -
- {privateUser && } - -
+ + {privateUser && } + ) } @@ -32,11 +30,11 @@ function UnseenNotificationsBubble(props: { privateUser: PrivateUser }) { const notifications = useUnseenGroupedNotification(privateUser) if (!notifications || notifications.length === 0 || seen) { - return
+ return null } return ( -
+
{notifications.length > NOTIFICATIONS_PER_PAGE ? `${NOTIFICATIONS_PER_PAGE}+` : notifications.length}