Skip to content

Commit

Permalink
feat: Wire up new GeneralSettings route
Browse files Browse the repository at this point in the history
  • Loading branch information
DafyddLlyr committed Jul 4, 2024
1 parent 9ce2932 commit 4141aae
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
5 changes: 5 additions & 0 deletions editor.planx.uk/src/components/EditorNavMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,11 @@ function EditorNavMenu() {
Icon: PaletteIcon,
route: `/${teamSlug}/design`,
},
{
title: "Settings",
Icon: TuneIcon,
route: `/${teamSlug}/general-settings`,
},
];

const flowLayoutRoutes: Route[] = [
Expand Down
9 changes: 9 additions & 0 deletions editor.planx.uk/src/routes/team.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import gql from "graphql-tag";
import { compose, lazy, mount, route, withData, withView } from "navi";
import DesignSettings from "pages/FlowEditor/components/Settings/DesignSettings";
import GeneralSettings from "pages/FlowEditor/components/Settings/GeneralSettings";
import React from "react";

import { client } from "../lib/graphql";
Expand Down Expand Up @@ -84,6 +85,14 @@ const routes = compose(
view: DesignSettings,
})),
),
"/general-settings": compose(
route(async (req) => ({
title: makeTitle(
[req.params.team, req.params.flow, "settings"].join("/"),
),
view: GeneralSettings,
})),
),
}),
);

Expand Down

0 comments on commit 4141aae

Please sign in to comment.