All files / src/routes sign-in.tsx

20% Statements 1/5
0% Branches 0/2
0% Functions 0/3
20% Lines 1/5

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16          1x                    
import { createFileRoute, redirect } from '@tanstack/react-router'
import { getSignedInUser } from '#/features/authentication/functions'
import { SignInPage } from '#/features/authentication/SignInPage'
import { m } from '#/paraglide/messages.js'
 
export const Route = createFileRoute('/sign-in')({
  // A signed-in user has nothing to do here.
  beforeLoad: async () => {
    if (await getSignedInUser()) {
      throw redirect({ to: '/' })
    }
  },
  head: () => ({ meta: [{ title: m.sign_in_page_title() }] }),
  component: () => <SignInPage />,
})