(feat): add cache package
(feat): improve local storage security (feat): move settings to dedicated settings package
This commit is contained in:
parent
fb095db7a6
commit
790a1db788
54 changed files with 1984 additions and 947 deletions
24
packages/settings/src/index.tsx
Normal file
24
packages/settings/src/index.tsx
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
import { createRoute, type AnyRoute } from "@tanstack/react-router";
|
||||
|
||||
import SettingsLayout from "./layout";
|
||||
import { settingsPages } from "./manifest";
|
||||
|
||||
export function createSettingsRoute(parentRoute: AnyRoute) {
|
||||
const settingsRoute = createRoute({
|
||||
getParentRoute: () => parentRoute,
|
||||
path: "settings",
|
||||
component: SettingsLayout,
|
||||
staticData: { showMobileNavbar: true },
|
||||
});
|
||||
|
||||
return settingsRoute.addChildren(
|
||||
settingsPages.map((page) =>
|
||||
createRoute({
|
||||
getParentRoute: () => settingsRoute,
|
||||
path: page.path,
|
||||
component: page.component,
|
||||
staticData: { showMobileNavbar: true },
|
||||
}),
|
||||
),
|
||||
);
|
||||
}
|
||||
Loading…
Reference in a new issue