mirror of
https://github.com/documenso/documenso.git
synced 2025-11-13 00:03:33 +10:00
13 lines
279 B
TypeScript
13 lines
279 B
TypeScript
import { redirect } from 'react-router';
|
|
import { getOptionalLoaderSession } from 'server/utils/get-loader-session';
|
|
|
|
export function loader() {
|
|
const session = getOptionalLoaderSession();
|
|
|
|
if (session) {
|
|
throw redirect('/documents');
|
|
}
|
|
|
|
throw redirect('/signin');
|
|
}
|