Fix message view without sign in

This commit is contained in:
MartinBraquet
2025-10-09 19:30:24 +02:00
parent 2661d15910
commit 16ffd6dfab

View File

@@ -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 ? (