mirror of
https://github.com/documenso/documenso.git
synced 2025-11-22 12:41:36 +10:00
fix: wip
This commit is contained in:
13
apps/remix/app/routes/_authenticated+/t.$teamUrl+/_index.tsx
Normal file
13
apps/remix/app/routes/_authenticated+/t.$teamUrl+/_index.tsx
Normal file
@ -0,0 +1,13 @@
|
||||
import { redirect } from 'react-router';
|
||||
|
||||
import { formatDocumentsPath } from '@documenso/lib/utils/teams';
|
||||
|
||||
import type { Route } from './+types/_index';
|
||||
|
||||
export function loader({ context }: Route.LoaderArgs) {
|
||||
if (!context.session?.currentTeam) {
|
||||
throw redirect('/documents');
|
||||
}
|
||||
|
||||
throw redirect(formatDocumentsPath(context.session.currentTeam.url));
|
||||
}
|
||||
Reference in New Issue
Block a user