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:
Vendored
+6
-3
@@ -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 & {};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user