mirror of
https://github.com/documenso/documenso.git
synced 2025-11-21 04:01:45 +10:00
fix: wip
This commit is contained in:
@ -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');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user