Files
sign/apps/remix/server/utils/get-loader-session.ts

14 lines
369 B
TypeScript
Raw Normal View History

2025-01-02 15:33:37 +11:00
import { getContext } from 'hono/context-storage';
import type { AppContext } from 'server/context';
import type { HonoEnv } from 'server/router';
/**
* Get the full context passed to the loader.
*
* @returns The full app context.
*/
export const getOptionalLoaderContext = (): AppContext => {
const { context } = getContext<HonoEnv>().var;
return context;
};