This commit is contained in:
David Nguyen
2025-02-04 16:24:26 +11:00
parent e5a9d9ddf0
commit 381a9d3fb8
61 changed files with 1932 additions and 300 deletions

View File

@ -4,7 +4,7 @@ import { redirect } from 'react-router';
/**
* Returns the session context or throws a redirect to signin if it is not present.
*/
export const getRequiredSessionContext = (context: AppLoadContext) => {
export const getRequiredLoaderSession = (context: AppLoadContext) => {
if (!context.session) {
throw redirect('/signin'); // Todo: Maybe add a redirect cookie to come back?
}
@ -15,7 +15,7 @@ export const getRequiredSessionContext = (context: AppLoadContext) => {
/**
* Returns the team session context or throws a redirect to signin if it is not present.
*/
export const getRequiredTeamSessionContext = (context: AppLoadContext) => {
export const getRequiredLoaderTeamSession = (context: AppLoadContext) => {
if (!context.session) {
throw redirect('/signin'); // Todo: Maybe add a redirect cookie to come back?
}