Added a hook for appOrigin
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
import { useTypedRouteLoaderData } from "remix-typedjson";
|
||||
import { loader } from "../root";
|
||||
|
||||
export function useAppOrigin() {
|
||||
const routeMatch = useTypedRouteLoaderData<typeof loader>("root");
|
||||
|
||||
return routeMatch!.appOrigin;
|
||||
}
|
||||
@@ -55,6 +55,7 @@ export const loader = async ({ request }: LoaderArgs) => {
|
||||
posthogProjectKey,
|
||||
features,
|
||||
appEnv: env.APP_ENV,
|
||||
appOrigin: env.APP_ORIGIN,
|
||||
},
|
||||
{ headers: { "Set-Cookie": await commitSession(session) } }
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user