feat: resolved all ts issues

This commit is contained in:
=
2024-12-28 20:45:27 +05:30
parent d77c26fa38
commit 398adfaf76
6 changed files with 19 additions and 15 deletions

View File

@@ -7,6 +7,10 @@ import { fetchUserDetails } from "@app/hooks/api/users/queries";
export const Route = createFileRoute("/_authenticate")({
beforeLoad: async ({ context }) => {
if (!context.serverConfig.initialized) {
throw redirect({ to: "/admin/signup" });
}
const data = await context.queryClient
.ensureQueryData({
queryKey: authKeys.getAuthToken,

View File

@@ -1,6 +1,6 @@
import { createFileRoute } from "@tanstack/react-router";
import { MemberDetailsByIDPage } from "./MemberDetailsByIdPage";
import { MemberDetailsByIDPage } from "./MemberDetailsByIDPage";
export const Route = createFileRoute(
"/_authenticate/_inject-org-details/cert-manager/$projectId/_cert-manager-layout/members/$membershipId"

View File

@@ -1,6 +1,6 @@
import { createFileRoute } from "@tanstack/react-router";
import { MemberDetailsByIDPage } from "./MemberDetailsByIdPage";
import { MemberDetailsByIDPage } from "./MemberDetailsByIDPage";
export const Route = createFileRoute(
"/_authenticate/_inject-org-details/kms/$projectId/_kms-layout/members/$membershipId"

View File

@@ -1,6 +1,6 @@
import { createFileRoute } from "@tanstack/react-router";
import { IPAllowListPage } from "./IPAllowListPage";
import { IPAllowListPage } from "./IPAllowlistPage";
export const Route = createFileRoute(
"/_authenticate/_inject-org-details/secret-manager/$projectId/_secret-manager-layout/allowlist"

View File

@@ -57,7 +57,7 @@ import { Route as secretManagerSettingsPageRouteImport } from './pages/secret-ma
import { Route as secretManagerSecretRotationPageRouteImport } from './pages/secret-manager/SecretRotationPage/route'
import { Route as secretManagerOverviewPageRouteImport } from './pages/secret-manager/OverviewPage/route'
import { Route as secretManagerSecretApprovalsPageRouteImport } from './pages/secret-manager/SecretApprovalsPage/route'
import { Route as secretManagerIPAllowListPageRouteImport } from './pages/secret-manager/IPAllowListPage/route'
import { Route as secretManagerIPAllowlistPageRouteImport } from './pages/secret-manager/IPAllowlistPage/route'
import { Route as organizationSecretManagerOverviewPageRouteImport } from './pages/organization/SecretManagerOverviewPage/route'
import { Route as organizationRoleByIDPageRouteImport } from './pages/organization/RoleByIDPage/route'
import { Route as organizationUserDetailsByIDPageRouteImport } from './pages/organization/UserDetailsByIDPage/route'
@@ -448,8 +448,8 @@ const secretManagerSecretApprovalsPageRouteRoute =
getParentRoute: () => secretManagerLayoutRoute,
} as any)
const secretManagerIPAllowListPageRouteRoute =
secretManagerIPAllowListPageRouteImport.update({
const secretManagerIPAllowlistPageRouteRoute =
secretManagerIPAllowlistPageRouteImport.update({
id: '/allowlist',
path: '/allowlist',
getParentRoute: () => secretManagerLayoutRoute,
@@ -1014,7 +1014,7 @@ declare module '@tanstack/react-router' {
id: '/_authenticate/_inject-org-details/secret-manager/$projectId/_secret-manager-layout/allowlist'
path: '/allowlist'
fullPath: '/secret-manager/$projectId/allowlist'
preLoaderRoute: typeof secretManagerIPAllowListPageRouteImport
preLoaderRoute: typeof secretManagerIPAllowlistPageRouteImport
parentRoute: typeof secretManagerLayoutImport
}
'/_authenticate/_inject-org-details/secret-manager/$projectId/_secret-manager-layout/approval': {
@@ -1301,7 +1301,7 @@ const AuthenticateInjectOrgDetailsKmsProjectIdRouteWithChildren =
)
interface secretManagerLayoutRouteChildren {
secretManagerIPAllowListPageRouteRoute: typeof secretManagerIPAllowListPageRouteRoute
secretManagerIPAllowlistPageRouteRoute: typeof secretManagerIPAllowlistPageRouteRoute
secretManagerSecretApprovalsPageRouteRoute: typeof secretManagerSecretApprovalsPageRouteRoute
secretManagerOverviewPageRouteRoute: typeof secretManagerOverviewPageRouteRoute
secretManagerSecretRotationPageRouteRoute: typeof secretManagerSecretRotationPageRouteRoute
@@ -1314,8 +1314,8 @@ interface secretManagerLayoutRouteChildren {
}
const secretManagerLayoutRouteChildren: secretManagerLayoutRouteChildren = {
secretManagerIPAllowListPageRouteRoute:
secretManagerIPAllowListPageRouteRoute,
secretManagerIPAllowlistPageRouteRoute:
secretManagerIPAllowlistPageRouteRoute,
secretManagerSecretApprovalsPageRouteRoute:
secretManagerSecretApprovalsPageRouteRoute,
secretManagerOverviewPageRouteRoute: secretManagerOverviewPageRouteRoute,
@@ -1563,7 +1563,7 @@ export interface FileRoutesByFullPath {
'/organization/members/$membershipId': typeof organizationUserDetailsByIDPageRouteRoute
'/organization/roles/$roleId': typeof organizationRoleByIDPageRouteRoute
'/organization/secret-manager/overview': typeof organizationSecretManagerOverviewPageRouteRoute
'/secret-manager/$projectId/allowlist': typeof secretManagerIPAllowListPageRouteRoute
'/secret-manager/$projectId/allowlist': typeof secretManagerIPAllowlistPageRouteRoute
'/secret-manager/$projectId/approval': typeof secretManagerSecretApprovalsPageRouteRoute
'/secret-manager/$projectId/overview': typeof secretManagerOverviewPageRouteRoute
'/secret-manager/$projectId/secret-rotation': typeof secretManagerSecretRotationPageRouteRoute
@@ -1630,7 +1630,7 @@ export interface FileRoutesByTo {
'/organization/members/$membershipId': typeof organizationUserDetailsByIDPageRouteRoute
'/organization/roles/$roleId': typeof organizationRoleByIDPageRouteRoute
'/organization/secret-manager/overview': typeof organizationSecretManagerOverviewPageRouteRoute
'/secret-manager/$projectId/allowlist': typeof secretManagerIPAllowListPageRouteRoute
'/secret-manager/$projectId/allowlist': typeof secretManagerIPAllowlistPageRouteRoute
'/secret-manager/$projectId/approval': typeof secretManagerSecretApprovalsPageRouteRoute
'/secret-manager/$projectId/overview': typeof secretManagerOverviewPageRouteRoute
'/secret-manager/$projectId/secret-rotation': typeof secretManagerSecretRotationPageRouteRoute
@@ -1710,7 +1710,7 @@ export interface FileRoutesById {
'/_authenticate/_inject-org-details/organization/_layout/members/$membershipId': typeof organizationUserDetailsByIDPageRouteRoute
'/_authenticate/_inject-org-details/organization/_layout/roles/$roleId': typeof organizationRoleByIDPageRouteRoute
'/_authenticate/_inject-org-details/organization/_layout/secret-manager/overview': typeof organizationSecretManagerOverviewPageRouteRoute
'/_authenticate/_inject-org-details/secret-manager/$projectId/_secret-manager-layout/allowlist': typeof secretManagerIPAllowListPageRouteRoute
'/_authenticate/_inject-org-details/secret-manager/$projectId/_secret-manager-layout/allowlist': typeof secretManagerIPAllowlistPageRouteRoute
'/_authenticate/_inject-org-details/secret-manager/$projectId/_secret-manager-layout/approval': typeof secretManagerSecretApprovalsPageRouteRoute
'/_authenticate/_inject-org-details/secret-manager/$projectId/_secret-manager-layout/overview': typeof secretManagerOverviewPageRouteRoute
'/_authenticate/_inject-org-details/secret-manager/$projectId/_secret-manager-layout/secret-rotation': typeof secretManagerSecretRotationPageRouteRoute
@@ -2310,7 +2310,7 @@ export const routeTree = rootRoute
"parent": "/_authenticate/_inject-org-details/organization/_layout"
},
"/_authenticate/_inject-org-details/secret-manager/$projectId/_secret-manager-layout/allowlist": {
"filePath": "secret-manager/IPAllowListPage/route.tsx",
"filePath": "secret-manager/IPAllowlistPage/route.tsx",
"parent": "/_authenticate/_inject-org-details/secret-manager/$projectId/_secret-manager-layout"
},
"/_authenticate/_inject-org-details/secret-manager/$projectId/_secret-manager-layout/approval": {

View File

@@ -31,7 +31,7 @@ const secretManagerRoutes = route("/secret-manager/$projectId", [
layout("secret-manager-layout", "secret-manager/layout.tsx", [
route("/overview", "secret-manager/OverviewPage/route.tsx"),
route("/secrets/$envSlug", "secret-manager/SecretDashboardPage/route.tsx"),
route("/allowlist", "secret-manager/IPAllowListPage/route.tsx"),
route("/allowlist", "secret-manager/IPAllowlistPage/route.tsx"),
route("/approval", "secret-manager/SecretApprovalsPage/route.tsx"),
route("/secret-rotation", "secret-manager/SecretRotationPage/route.tsx"),
route("/settings", "secret-manager/SettingsPage/route.tsx"),