diff --git a/web/pages/messages/index.tsx b/web/pages/messages/index.tsx
index b01e8b1..1a37c02 100644
--- a/web/pages/messages/index.tsx
+++ b/web/pages/messages/index.tsx
@@ -1,24 +1,24 @@
import clsx from 'clsx'
-import { User } from 'common/user'
-import { parseJsonContentToText } from 'common/util/parse'
+import {User} from 'common/user'
+import {parseJsonContentToText} from 'common/util/parse'
import Link from 'next/link'
-import { Col } from 'web/components/layout/col'
-import { PageBase } from 'web/components/page-base'
-import { Row } from 'web/components/layout/row'
+import {Col} from 'web/components/layout/col'
+import {PageBase} from 'web/components/page-base'
+import {Row} from 'web/components/layout/row'
import NewMessageButton from 'web/components/messaging/new-message-button'
-import { RelativeTimestamp } from 'web/components/relative-timestamp'
-import { Title } from 'web/components/widgets/title'
+import {RelativeTimestamp} from 'web/components/relative-timestamp'
+import {Title} from 'web/components/widgets/title'
import {
usePrivateMessages,
useSortedPrivateMessageMemberships,
useUnseenPrivateMessageChannels,
} from 'web/hooks/use-private-messages'
-import { useUser } from 'web/hooks/use-user'
-import { useUsersInStore } from 'web/hooks/use-user-supabase'
-import { useRedirectIfSignedOut } from 'web/hooks/use-redirect-if-signed-out'
-import { MultipleOrSingleAvatars } from 'web/components/multiple-or-single-avatars'
-import { BannedBadge } from 'web/components/widgets/user-link'
-import { PrivateMessageChannel } from 'common/supabase/private-messages'
+import {useUser} from 'web/hooks/use-user'
+import {useUsersInStore} from 'web/hooks/use-user-supabase'
+import {useRedirectIfSignedOut} from 'web/hooks/use-redirect-if-signed-out'
+import {MultipleOrSingleAvatars} from 'web/components/multiple-or-single-avatars'
+import {BannedBadge} from 'web/components/widgets/user-link'
+import {PrivateMessageChannel} from 'common/supabase/private-messages'
import {SEO} from "web/components/SEO";
@@ -33,17 +33,17 @@ export default function MessagesPage() {
description={'Your Messages'}
url={`/messages`}
/>
- {currentUser && }
+ {currentUser && }
)
}
export function MessagesContent(props: { currentUser: User }) {
- const { currentUser } = props
- const { channels, memberIdsByChannelId } = useSortedPrivateMessageMemberships(
+ const {currentUser} = props
+ const {channels, memberIdsByChannelId} = useSortedPrivateMessageMemberships(
currentUser.id
)
- const { lastSeenChatTimeByChannelId } = useUnseenPrivateMessageChannels(
+ const {lastSeenChatTimeByChannelId} = useUnseenPrivateMessageChannels(
currentUser.id,
true
)
@@ -52,7 +52,7 @@ export function MessagesContent(props: { currentUser: User }) {
<>
Messages
-
+
{channels && channels.length === 0 && (
@@ -79,13 +79,14 @@ export function MessagesContent(props: { currentUser: User }) {
>
)
}
+
export const MessageChannelRow = (props: {
otherUserIds: string[]
currentUser: User
channel: PrivateMessageChannel
lastSeenTime: string
}) => {
- const { otherUserIds, lastSeenTime, currentUser, channel } = props
+ const {otherUserIds, lastSeenTime, currentUser, channel} = props
const channelId = channel.channel_id
const otherUsers = useUsersInStore(otherUserIds, `${channelId}`, 100)
const messages = usePrivateMessages(channelId, 1, currentUser.id)
@@ -120,10 +121,10 @@ export const MessageChannelRow = (props: {
{otherUsers.length > 2 && ` & ${otherUsers.length - 2} more`}
)}
- {isBanned && }
+ {isBanned && }
- {chat && }
+ {chat && }