mirror of
https://github.com/documenso/documenso.git
synced 2026-08-25 07:42:28 +10:00
16 lines
464 B
TypeScript
16 lines
464 B
TypeScript
import { redirect } from 'react-router';
|
|
|
|
import type { Route } from './+types/organisation.decline.$token';
|
|
|
|
export function loader({ params }: Route.LoaderArgs) {
|
|
const { token } = params;
|
|
|
|
if (!token) {
|
|
throw redirect('/');
|
|
}
|
|
|
|
// Declining now happens on the invite page via tRPC. Redirect there with the
|
|
// `action=decline` flag so it renders the decline-only view (no accept).
|
|
throw redirect(`/organisation/invite/${token}?action=decline`);
|
|
}
|