Enhance user routing and layout management. Added support for user-specific routes, including dynamic user ID handling and updated component imports. Improved type definitions and user data mapping in hooks for better user experience.

This commit is contained in:
eewing
2026-02-18 15:59:16 -06:00
parent 1af7aeb7d9
commit 5776a1fdb1
22 changed files with 274 additions and 28 deletions
+6 -3
View File
@@ -27,19 +27,22 @@ export {};
declare module "$app/types" {
export interface AppTypes {
RouteId(): "/" | "/api" | "/api/darkmode" | "/login" | "/logout" | "/[site]";
RouteId(): "/" | "/api" | "/api/darkmode" | "/login" | "/logout" | "/users" | "/users/[id]" | "/[site]";
RouteParams(): {
"/users/[id]": { id: string };
"/[site]": { site: string }
};
LayoutParams(): {
"/": { site?: string };
"/": { id?: string; site?: string };
"/api": Record<string, never>;
"/api/darkmode": Record<string, never>;
"/login": Record<string, never>;
"/logout": Record<string, never>;
"/users": { id?: string };
"/users/[id]": { id: string };
"/[site]": { site: string }
};
Pathname(): "/" | "/api/darkmode" | "/login" | "/logout" | `/${string}` & {};
Pathname(): "/" | "/api/darkmode" | "/login" | "/logout" | "/users" | `/users/${string}` & {} | `/${string}` & {};
ResolvedPathname(): `${"" | `/${string}`}${ReturnType<AppTypes['Pathname']>}`;
Asset(): string & {};
}