This commit is contained in:
David Nguyen
2025-02-07 00:58:50 +11:00
parent e5cc6455dd
commit 8373af3f41
34 changed files with 193 additions and 143 deletions

View File

@ -1,9 +1,10 @@
import { redirect } from 'react-router';
import { getOptionalLoaderSession } from 'server/utils/get-loader-session';
import type { Route } from './+types/_index';
export function loader() {
const session = getOptionalLoaderSession();
export function loader({ context }: Route.LoaderArgs) {
if (context.session) {
if (session) {
throw redirect('/documents');
}