mirror of
https://github.com/documenso/documenso.git
synced 2025-11-15 09:12:02 +10:00
wip
This commit is contained in:
15
apps/remix/app/routes/_index.tsx
Normal file
15
apps/remix/app/routes/_index.tsx
Normal file
@ -0,0 +1,15 @@
|
||||
import { redirect } from 'react-router';
|
||||
|
||||
import { getSession } from '@documenso/auth/server/lib/utils/get-session';
|
||||
|
||||
import type { Route } from './+types/_index';
|
||||
|
||||
export async function loader({ request }: Route.LoaderArgs) {
|
||||
const { user } = await getSession(request);
|
||||
|
||||
if (user) {
|
||||
return redirect('/documents');
|
||||
}
|
||||
|
||||
return redirect('/signin');
|
||||
}
|
||||
Reference in New Issue
Block a user