mirror of
https://github.com/CompassConnections/Compass.git
synced 2026-04-13 02:58:29 -04:00
Fix message view without sign in
This commit is contained in:
@@ -50,6 +50,10 @@ export default function PrivateMessagesPage() {
|
||||
const { channelId: channelIdString } = router.query as { channelId: string }
|
||||
const channelId = router.isReady ? parseInt(channelIdString) : undefined
|
||||
const user = useUser()
|
||||
if (user === null) {
|
||||
router.replace(`/signin?returnTo=${encodeURIComponent('/messages')}`)
|
||||
return <LoadingIndicator />
|
||||
}
|
||||
return (
|
||||
<LovePage trackPageView={'private messages page'}>
|
||||
{router.isReady && channelId && user ? (
|
||||
|
||||
Reference in New Issue
Block a user