chore: switch to react-router v7
This commit is contained in:
parent
39504e2487
commit
aa9872a45b
101 changed files with 3825 additions and 6796 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import { createCookieSessionStorage } from '@remix-run/node' // Or cloudflare/deno
|
||||
import { createCookieSessionStorage } from 'react-router'; // Or cloudflare/deno
|
||||
|
||||
export type SessionData = {
|
||||
hsApiKey: string;
|
||||
|
|
@ -9,18 +9,14 @@ export type SessionData = {
|
|||
name: string;
|
||||
email?: string;
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
type SessionFlashData = {
|
||||
error: string;
|
||||
}
|
||||
};
|
||||
|
||||
export const {
|
||||
getSession,
|
||||
commitSession,
|
||||
destroySession
|
||||
} = createCookieSessionStorage<SessionData, SessionFlashData>(
|
||||
{
|
||||
export const { getSession, commitSession, destroySession } =
|
||||
createCookieSessionStorage<SessionData, SessionFlashData>({
|
||||
cookie: {
|
||||
name: 'hp_sess',
|
||||
httpOnly: true,
|
||||
|
|
@ -29,7 +25,5 @@ export const {
|
|||
sameSite: 'lax',
|
||||
secrets: [process.env.COOKIE_SECRET!],
|
||||
secure: process.env.COOKIE_SECURE !== 'false',
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
},
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue