mirror of
https://github.com/documenso/documenso.git
synced 2025-11-20 11:41:44 +10:00
feat: migrate nextjs to rr7
This commit is contained in:
13
apps/remix/server/utils/get-loader-session.ts
Normal file
13
apps/remix/server/utils/get-loader-session.ts
Normal file
@ -0,0 +1,13 @@
|
||||
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;
|
||||
};
|
||||
Reference in New Issue
Block a user