Rename NewFrameworkPage -> NewFrameworkPage
Signed-off-by: Émile Ré <nemile.re@gmail.com>
This commit is contained in:
@@ -5,16 +5,16 @@ import HomePage from "./HomePage";
|
||||
import NoOrganizationLayout from "./NoOrganizationLayout";
|
||||
import OrganizationLayout from "./OrganizationLayout";
|
||||
import { SettingsPage } from "./SettingsPage";
|
||||
import { CreateFrameworkPage } from "./frameworks/CreateFrameworkPage";
|
||||
import { EditFrameworkPage } from "./frameworks/EditFrameworkPage";
|
||||
import { FrameworkLayout } from "./frameworks/FrameworkLayout";
|
||||
import { FrameworkListPage } from "./frameworks/FrameworkListPage";
|
||||
import { FrameworkPage } from "./frameworks/FrameworkPage";
|
||||
import { EditFrameworkPage } from "./frameworks/EditFrameworkPage";
|
||||
import { NewFrameworkPage } from "./frameworks/NewFrameworkPage";
|
||||
import { ControlPage } from "./frameworks/controls/ControlPage";
|
||||
import { EditMitigationPage } from "./mitigations/EditMitigationPage";
|
||||
import { MitigationListPage } from "./mitigations/MitigationListPage";
|
||||
import { NewMitigationPage } from "./mitigations/NewMitigationPage";
|
||||
import { MitigationPage } from "./mitigations/MitigationPage";
|
||||
import { NewMitigationPage } from "./mitigations/NewMitigationPage";
|
||||
import { CreatePeoplePage } from "./people/CreatePeoplePage";
|
||||
import { PeopleListPage } from "./people/PeopleListPage";
|
||||
import { PeoplePage } from "./people/PeoplePage";
|
||||
@@ -38,7 +38,7 @@ export function OrganizationsRoutes() {
|
||||
<Route path="people/:peopleId" element={<PeoplePage />} />
|
||||
<Route path="vendors" element={<VendorListPage />} />
|
||||
<Route path="frameworks" element={<FrameworkListPage />} />
|
||||
<Route path="frameworks/new" element={<CreateFrameworkPage />} />
|
||||
<Route path="frameworks/new" element={<NewFrameworkPage />} />
|
||||
<Route path="frameworks/:frameworkId/*">
|
||||
<Route element={<FrameworkLayout />}>
|
||||
<Route index element={<FrameworkPage />} />
|
||||
|
||||
@@ -4,9 +4,9 @@ import { lazy } from "@probo/react-lazy";
|
||||
import { useLocation } from "react-router";
|
||||
import { ErrorBoundaryWithLocation } from "../ErrorBoundary";
|
||||
|
||||
const CreateFrameworkView = lazy(() => import("./CreateFrameworkView"));
|
||||
const NewFrameworkView = lazy(() => import("./NewFrameworkView"));
|
||||
|
||||
export function CreateFrameworkViewSkeleton() {
|
||||
export function NewFrameworkViewSkeleton() {
|
||||
return (
|
||||
<PageTemplateSkeleton
|
||||
title="Create Framework"
|
||||
@@ -17,16 +17,13 @@ export function CreateFrameworkViewSkeleton() {
|
||||
);
|
||||
}
|
||||
|
||||
export function CreateFrameworkPage() {
|
||||
export function NewFrameworkPage() {
|
||||
const location = useLocation();
|
||||
|
||||
return (
|
||||
<Suspense
|
||||
key={location.pathname}
|
||||
fallback={<CreateFrameworkViewSkeleton />}
|
||||
>
|
||||
<Suspense key={location.pathname} fallback={<NewFrameworkViewSkeleton />}>
|
||||
<ErrorBoundaryWithLocation>
|
||||
<CreateFrameworkView />
|
||||
<NewFrameworkView />
|
||||
</ErrorBoundaryWithLocation>
|
||||
</Suspense>
|
||||
);
|
||||
@@ -9,12 +9,12 @@ import { Textarea } from "@/components/ui/textarea";
|
||||
import { useToast } from "@/hooks/use-toast";
|
||||
import { HelpCircle } from "lucide-react";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { CreateFrameworkViewCreateFrameworkMutation } from "./__generated__/CreateFrameworkViewCreateFrameworkMutation.graphql";
|
||||
import { NewFrameworkViewCreateFrameworkMutation } from "./__generated__/NewFrameworkViewCreateFrameworkMutation.graphql";
|
||||
import { PageTemplate } from "@/components/PageTemplate";
|
||||
import { CreateFrameworkViewSkeleton } from "./CreateFrameworkPage";
|
||||
import { NewFrameworkViewSkeleton } from "./NewFrameworkPage";
|
||||
|
||||
const createFrameworkMutation = graphql`
|
||||
mutation CreateFrameworkViewCreateFrameworkMutation(
|
||||
mutation NewFrameworkViewCreateFrameworkMutation(
|
||||
$input: CreateFrameworkInput!
|
||||
$connections: [ID!]!
|
||||
) {
|
||||
@@ -91,7 +91,7 @@ function EditableField({
|
||||
);
|
||||
}
|
||||
|
||||
function CreateFrameworkViewContent() {
|
||||
function NewFrameworkViewContent() {
|
||||
const { organizationId } = useParams();
|
||||
const navigate = useNavigate();
|
||||
const { toast } = useToast();
|
||||
@@ -101,7 +101,7 @@ function CreateFrameworkViewContent() {
|
||||
});
|
||||
|
||||
const [commit, isInFlight] =
|
||||
useMutation<CreateFrameworkViewCreateFrameworkMutation>(
|
||||
useMutation<NewFrameworkViewCreateFrameworkMutation>(
|
||||
createFrameworkMutation
|
||||
);
|
||||
|
||||
@@ -210,10 +210,10 @@ function CreateFrameworkViewContent() {
|
||||
);
|
||||
}
|
||||
|
||||
export default function CreateFrameworkView() {
|
||||
export default function NewFrameworkView() {
|
||||
return (
|
||||
<Suspense fallback={<CreateFrameworkViewSkeleton />}>
|
||||
<CreateFrameworkViewContent />
|
||||
<Suspense fallback={<NewFrameworkViewSkeleton />}>
|
||||
<NewFrameworkViewContent />
|
||||
</Suspense>
|
||||
);
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<dca7347e7f5c3d8271623553ee52094d>>
|
||||
* @generated SignedSource<<88977ec320d7f163cf378446f9eb7f6a>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -14,11 +14,11 @@ export type CreateFrameworkInput = {
|
||||
name: string;
|
||||
organizationId: string;
|
||||
};
|
||||
export type CreateFrameworkViewCreateFrameworkMutation$variables = {
|
||||
export type NewFrameworkViewCreateFrameworkMutation$variables = {
|
||||
connections: ReadonlyArray<string>;
|
||||
input: CreateFrameworkInput;
|
||||
};
|
||||
export type CreateFrameworkViewCreateFrameworkMutation$data = {
|
||||
export type NewFrameworkViewCreateFrameworkMutation$data = {
|
||||
readonly createFramework: {
|
||||
readonly frameworkEdge: {
|
||||
readonly node: {
|
||||
@@ -29,9 +29,9 @@ export type CreateFrameworkViewCreateFrameworkMutation$data = {
|
||||
};
|
||||
};
|
||||
};
|
||||
export type CreateFrameworkViewCreateFrameworkMutation = {
|
||||
response: CreateFrameworkViewCreateFrameworkMutation$data;
|
||||
variables: CreateFrameworkViewCreateFrameworkMutation$variables;
|
||||
export type NewFrameworkViewCreateFrameworkMutation = {
|
||||
response: NewFrameworkViewCreateFrameworkMutation$data;
|
||||
variables: NewFrameworkViewCreateFrameworkMutation$variables;
|
||||
};
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
@@ -103,7 +103,7 @@ return {
|
||||
],
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "CreateFrameworkViewCreateFrameworkMutation",
|
||||
"name": "NewFrameworkViewCreateFrameworkMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
@@ -128,7 +128,7 @@ return {
|
||||
(v0/*: any*/)
|
||||
],
|
||||
"kind": "Operation",
|
||||
"name": "CreateFrameworkViewCreateFrameworkMutation",
|
||||
"name": "NewFrameworkViewCreateFrameworkMutation",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
@@ -161,16 +161,16 @@ return {
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "7502bf40a1731a4b7fd1a019ac438b39",
|
||||
"cacheID": "5b039fa77c4cfe00ce1001680520d9a9",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "CreateFrameworkViewCreateFrameworkMutation",
|
||||
"name": "NewFrameworkViewCreateFrameworkMutation",
|
||||
"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;
|
||||
Reference in New Issue
Block a user