Rename NewFrameworkPage -> NewFrameworkPage

Signed-off-by: Émile Ré <nemile.re@gmail.com>
This commit is contained in:
Émile Ré
2025-04-04 13:53:34 +04:00
parent 225bcf58d1
commit 09cfa7fdc9
4 changed files with 29 additions and 32 deletions

View File

@@ -5,16 +5,16 @@ import HomePage from "./HomePage";
import NoOrganizationLayout from "./NoOrganizationLayout"; import NoOrganizationLayout from "./NoOrganizationLayout";
import OrganizationLayout from "./OrganizationLayout"; import OrganizationLayout from "./OrganizationLayout";
import { SettingsPage } from "./SettingsPage"; import { SettingsPage } from "./SettingsPage";
import { CreateFrameworkPage } from "./frameworks/CreateFrameworkPage"; import { EditFrameworkPage } from "./frameworks/EditFrameworkPage";
import { FrameworkLayout } from "./frameworks/FrameworkLayout"; import { FrameworkLayout } from "./frameworks/FrameworkLayout";
import { FrameworkListPage } from "./frameworks/FrameworkListPage"; import { FrameworkListPage } from "./frameworks/FrameworkListPage";
import { FrameworkPage } from "./frameworks/FrameworkPage"; import { FrameworkPage } from "./frameworks/FrameworkPage";
import { EditFrameworkPage } from "./frameworks/EditFrameworkPage"; import { NewFrameworkPage } from "./frameworks/NewFrameworkPage";
import { ControlPage } from "./frameworks/controls/ControlPage"; import { ControlPage } from "./frameworks/controls/ControlPage";
import { EditMitigationPage } from "./mitigations/EditMitigationPage"; import { EditMitigationPage } from "./mitigations/EditMitigationPage";
import { MitigationListPage } from "./mitigations/MitigationListPage"; import { MitigationListPage } from "./mitigations/MitigationListPage";
import { NewMitigationPage } from "./mitigations/NewMitigationPage";
import { MitigationPage } from "./mitigations/MitigationPage"; import { MitigationPage } from "./mitigations/MitigationPage";
import { NewMitigationPage } from "./mitigations/NewMitigationPage";
import { CreatePeoplePage } from "./people/CreatePeoplePage"; import { CreatePeoplePage } from "./people/CreatePeoplePage";
import { PeopleListPage } from "./people/PeopleListPage"; import { PeopleListPage } from "./people/PeopleListPage";
import { PeoplePage } from "./people/PeoplePage"; import { PeoplePage } from "./people/PeoplePage";
@@ -38,7 +38,7 @@ export function OrganizationsRoutes() {
<Route path="people/:peopleId" element={<PeoplePage />} /> <Route path="people/:peopleId" element={<PeoplePage />} />
<Route path="vendors" element={<VendorListPage />} /> <Route path="vendors" element={<VendorListPage />} />
<Route path="frameworks" element={<FrameworkListPage />} /> <Route path="frameworks" element={<FrameworkListPage />} />
<Route path="frameworks/new" element={<CreateFrameworkPage />} /> <Route path="frameworks/new" element={<NewFrameworkPage />} />
<Route path="frameworks/:frameworkId/*"> <Route path="frameworks/:frameworkId/*">
<Route element={<FrameworkLayout />}> <Route element={<FrameworkLayout />}>
<Route index element={<FrameworkPage />} /> <Route index element={<FrameworkPage />} />

View File

@@ -4,9 +4,9 @@ import { lazy } from "@probo/react-lazy";
import { useLocation } from "react-router"; import { useLocation } from "react-router";
import { ErrorBoundaryWithLocation } from "../ErrorBoundary"; import { ErrorBoundaryWithLocation } from "../ErrorBoundary";
const CreateFrameworkView = lazy(() => import("./CreateFrameworkView")); const NewFrameworkView = lazy(() => import("./NewFrameworkView"));
export function CreateFrameworkViewSkeleton() { export function NewFrameworkViewSkeleton() {
return ( return (
<PageTemplateSkeleton <PageTemplateSkeleton
title="Create Framework" title="Create Framework"
@@ -17,16 +17,13 @@ export function CreateFrameworkViewSkeleton() {
); );
} }
export function CreateFrameworkPage() { export function NewFrameworkPage() {
const location = useLocation(); const location = useLocation();
return ( return (
<Suspense <Suspense key={location.pathname} fallback={<NewFrameworkViewSkeleton />}>
key={location.pathname}
fallback={<CreateFrameworkViewSkeleton />}
>
<ErrorBoundaryWithLocation> <ErrorBoundaryWithLocation>
<CreateFrameworkView /> <NewFrameworkView />
</ErrorBoundaryWithLocation> </ErrorBoundaryWithLocation>
</Suspense> </Suspense>
); );

View File

@@ -9,12 +9,12 @@ import { Textarea } from "@/components/ui/textarea";
import { useToast } from "@/hooks/use-toast"; import { useToast } from "@/hooks/use-toast";
import { HelpCircle } from "lucide-react"; import { HelpCircle } from "lucide-react";
import { cn } from "@/lib/utils"; import { cn } from "@/lib/utils";
import { CreateFrameworkViewCreateFrameworkMutation } from "./__generated__/CreateFrameworkViewCreateFrameworkMutation.graphql"; import { NewFrameworkViewCreateFrameworkMutation } from "./__generated__/NewFrameworkViewCreateFrameworkMutation.graphql";
import { PageTemplate } from "@/components/PageTemplate"; import { PageTemplate } from "@/components/PageTemplate";
import { CreateFrameworkViewSkeleton } from "./CreateFrameworkPage"; import { NewFrameworkViewSkeleton } from "./NewFrameworkPage";
const createFrameworkMutation = graphql` const createFrameworkMutation = graphql`
mutation CreateFrameworkViewCreateFrameworkMutation( mutation NewFrameworkViewCreateFrameworkMutation(
$input: CreateFrameworkInput! $input: CreateFrameworkInput!
$connections: [ID!]! $connections: [ID!]!
) { ) {
@@ -91,7 +91,7 @@ function EditableField({
); );
} }
function CreateFrameworkViewContent() { function NewFrameworkViewContent() {
const { organizationId } = useParams(); const { organizationId } = useParams();
const navigate = useNavigate(); const navigate = useNavigate();
const { toast } = useToast(); const { toast } = useToast();
@@ -101,7 +101,7 @@ function CreateFrameworkViewContent() {
}); });
const [commit, isInFlight] = const [commit, isInFlight] =
useMutation<CreateFrameworkViewCreateFrameworkMutation>( useMutation<NewFrameworkViewCreateFrameworkMutation>(
createFrameworkMutation createFrameworkMutation
); );
@@ -210,10 +210,10 @@ function CreateFrameworkViewContent() {
); );
} }
export default function CreateFrameworkView() { export default function NewFrameworkView() {
return ( return (
<Suspense fallback={<CreateFrameworkViewSkeleton />}> <Suspense fallback={<NewFrameworkViewSkeleton />}>
<CreateFrameworkViewContent /> <NewFrameworkViewContent />
</Suspense> </Suspense>
); );
} }

View File

@@ -1,5 +1,5 @@
/** /**
* @generated SignedSource<<dca7347e7f5c3d8271623553ee52094d>> * @generated SignedSource<<88977ec320d7f163cf378446f9eb7f6a>>
* @lightSyntaxTransform * @lightSyntaxTransform
* @nogrep * @nogrep
*/ */
@@ -14,11 +14,11 @@ export type CreateFrameworkInput = {
name: string; name: string;
organizationId: string; organizationId: string;
}; };
export type CreateFrameworkViewCreateFrameworkMutation$variables = { export type NewFrameworkViewCreateFrameworkMutation$variables = {
connections: ReadonlyArray<string>; connections: ReadonlyArray<string>;
input: CreateFrameworkInput; input: CreateFrameworkInput;
}; };
export type CreateFrameworkViewCreateFrameworkMutation$data = { export type NewFrameworkViewCreateFrameworkMutation$data = {
readonly createFramework: { readonly createFramework: {
readonly frameworkEdge: { readonly frameworkEdge: {
readonly node: { readonly node: {
@@ -29,9 +29,9 @@ export type CreateFrameworkViewCreateFrameworkMutation$data = {
}; };
}; };
}; };
export type CreateFrameworkViewCreateFrameworkMutation = { export type NewFrameworkViewCreateFrameworkMutation = {
response: CreateFrameworkViewCreateFrameworkMutation$data; response: NewFrameworkViewCreateFrameworkMutation$data;
variables: CreateFrameworkViewCreateFrameworkMutation$variables; variables: NewFrameworkViewCreateFrameworkMutation$variables;
}; };
const node: ConcreteRequest = (function(){ const node: ConcreteRequest = (function(){
@@ -103,7 +103,7 @@ return {
], ],
"kind": "Fragment", "kind": "Fragment",
"metadata": null, "metadata": null,
"name": "CreateFrameworkViewCreateFrameworkMutation", "name": "NewFrameworkViewCreateFrameworkMutation",
"selections": [ "selections": [
{ {
"alias": null, "alias": null,
@@ -128,7 +128,7 @@ return {
(v0/*: any*/) (v0/*: any*/)
], ],
"kind": "Operation", "kind": "Operation",
"name": "CreateFrameworkViewCreateFrameworkMutation", "name": "NewFrameworkViewCreateFrameworkMutation",
"selections": [ "selections": [
{ {
"alias": null, "alias": null,
@@ -161,16 +161,16 @@ return {
] ]
}, },
"params": { "params": {
"cacheID": "7502bf40a1731a4b7fd1a019ac438b39", "cacheID": "5b039fa77c4cfe00ce1001680520d9a9",
"id": null, "id": null,
"metadata": {}, "metadata": {},
"name": "CreateFrameworkViewCreateFrameworkMutation", "name": "NewFrameworkViewCreateFrameworkMutation",
"operationKind": "mutation", "operationKind": "mutation",
"text": "mutation CreateFrameworkViewCreateFrameworkMutation(\n $input: CreateFrameworkInput!\n) {\n createFramework(input: $input) {\n frameworkEdge {\n node {\n id\n name\n description\n }\n }\n }\n}\n" "text": "mutation NewFrameworkViewCreateFrameworkMutation(\n $input: CreateFrameworkInput!\n) {\n createFramework(input: $input) {\n frameworkEdge {\n node {\n id\n name\n description\n }\n }\n }\n}\n"
} }
}; };
})(); })();
(node as any).hash = "cb800b9880232714d34698beb7bf8d84"; (node as any).hash = "acf050994ea381c40d642a8d21e5bf98";
export default node; export default node;