diff --git a/web/pages/messages/index.tsx b/web/components/messaging/message-content.tsx similarity index 95% rename from web/pages/messages/index.tsx rename to web/components/messaging/message-content.tsx index 7e01f3f63d..3a445ae697 100644 --- a/web/pages/messages/index.tsx +++ b/web/components/messaging/message-content.tsx @@ -20,14 +20,6 @@ import { MultipleOrSingleAvatars } from 'web/components/multiple-or-single-avata import { BannedBadge } from 'web/components/widgets/user-link' import { PrivateMessageChannel } from 'common/supabase/private-messages' -export default function MessagesPage() { - return ( - - - - ) -} - export function MessagesContent() { useRedirectIfSignedOut() const currentUser = useUser() @@ -37,8 +29,7 @@ export function MessagesContent() { return ( <> - - Messages + diff --git a/web/components/messaging/messages-icon.tsx b/web/components/messaging/messages-icon.tsx index f35e093770..e42ebc18de 100644 --- a/web/components/messaging/messages-icon.tsx +++ b/web/components/messaging/messages-icon.tsx @@ -21,23 +21,17 @@ export function UnseenMessagesBubble(props: { className?: string }) { ) } -export function PrivateMessagesIcon(props: { - className?: string - bubbleClassName?: string - solid?: boolean -}) { - const { solid, className, bubbleClassName } = props +export function UnreadPrivateMessages(props: { className?: string }) { + const { className } = props const privateUser = usePrivateUser() - const Icon = solid ? BiSolidEnvelope : BiEnvelope return ( {privateUser && ( )} - ) } @@ -45,9 +39,8 @@ export function PrivateMessagesIcon(props: { function InternalUnseenMessagesBubble(props: { privateUser: PrivateUser bubbleClassName?: string - className?: string }) { - const { privateUser, className, bubbleClassName } = props + const { privateUser, bubbleClassName } = props const unseenMessages = useUnseenPrivateMessageChannels(privateUser.id) const pathName = usePathname() @@ -61,20 +54,13 @@ function InternalUnseenMessagesBubble(props: { return null return ( - -
- {unseenMessages.length} -
-
+ {unseenMessages.length} + ) } diff --git a/web/components/messaging/new-message-button.tsx b/web/components/messaging/new-message-button.tsx index 206128ff8c..cae53fb862 100644 --- a/web/components/messaging/new-message-button.tsx +++ b/web/components/messaging/new-message-button.tsx @@ -1,5 +1,5 @@ import { PlusIcon } from '@heroicons/react/solid' -import { Button } from '../buttons/button' +import { Button, IconButton } from '../buttons/button' import { useState } from 'react' import { MODAL_CLASS, Modal } from '../layout/modal' import { Col } from '../layout/col' @@ -11,14 +11,24 @@ import { SelectUsers } from 'web/components/select-users' import { DisplayUser } from 'common/api/user-types' import { usePrivateUser } from 'web/hooks/use-user' import { buildArray } from 'common/util/array' +import { RiChatNewFill } from 'react-icons/ri' -export default function NewMessageButton() { +export default function NewMessageButton(props: { className?: string }) { const [open, setOpen] = useState(false) + const { className } = props return ( <> - diff --git a/web/components/nav/bottom-nav-bar.tsx b/web/components/nav/bottom-nav-bar.tsx index ce3d4b4b84..3b170205a6 100644 --- a/web/components/nav/bottom-nav-bar.tsx +++ b/web/components/nav/bottom-nav-bar.tsx @@ -117,7 +117,6 @@ export function BottomNavBar() { )} onClick={() => setSidebarOpen(true)} > -