feat(auth): login state proof of concept

This commit is contained in:
Mona Mayrhofer 2025-04-03 13:34:45 +02:00
parent 4bc05aaa2a
commit 85afa969f1
No known key found for this signature in database
GPG key ID: 5C83114FA383C6A0
14 changed files with 188 additions and 96 deletions

View file

@ -1,7 +1,23 @@
import type { Config } from "@react-router/dev/config";
import { type Future, Route } from "react-router";
declare module "react-router" {
interface Future {
unstable_middleware: true; // 👈 Enable middleware types
}
//AppLoadContext is replaced with the ContextAPI enabled by the unstable_middlewares flag
// interface AppLoadContext {
// remove_me_i_am_a_test: string;
// }
}
export default {
// Config options...
// Server-side render by default, to enable SPA mode set this to `false`
ssr: true,
future: {
//TODO Keep up to date with the unstable releases over at https://reactrouter.com/changelog
//See: https://github.com/remix-run/react-router/blob/release-next/decisions/0014-context-middleware.md
unstable_middleware: true,
},
} satisfies Config;