Skip to content

Commit

Permalink
[Publisher]Settings.tsx and SettingsMenu: refactor and removal
Browse files Browse the repository at this point in the history
  • Loading branch information
corypride committed Mar 29, 2024
1 parent 3b7a92f commit 54373c1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 75 deletions.
46 changes: 0 additions & 46 deletions publisher/src/components/Settings/SettingsMenu.tsx

This file was deleted.

1 change: 0 additions & 1 deletion publisher/src/components/Settings/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,5 @@ export * from "./AccountSettings";
export * from "./AgencySettings";
export * from "./hooks";
export * from "./Settings.styles";
export * from "./SettingsMenu";
export * from "./types";
export * from "./utils";
31 changes: 3 additions & 28 deletions publisher/src/pages/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,47 +16,22 @@
// =============================================================================

import React from "react";
import { Navigate, Route, Routes } from "react-router-dom";

import { UploadedFiles } from "../components/DataUpload";
import {
AccountSettings,
AgencySettings,
ContentDisplay,
SettingsContainer,
SettingsMenu,
} from "../components/Settings";
import { AgencySettingsTeamManagement } from "../components/Settings/AgencySettingsTeamManagement";

export const settingsMenuPaths = [
{ displayLabel: "Your Account", path: "account" },
{ displayLabel: "Agency Settings", path: "agency-settings" },
{ displayLabel: "Team Management", path: "team-management" },
{ displayLabel: "Uploaded Files", path: "uploaded-files" },
];

export type ListOfMetricsForNavigation = {
key: string;
display_name: string;
};

const Settings = () => {
return (
<SettingsContainer>
<SettingsMenu />

<ContentDisplay>
<Routes>
<Route path="/" element={<Navigate to="account" replace />} />
<Route path="/account" element={<AccountSettings />} />
<Route path="/agency-settings" element={<AgencySettings />} />
<Route
path="/team-management"
element={<AgencySettingsTeamManagement />}
/>
<Route path="/uploaded-files" element={<UploadedFiles />} />
<Route path="*" element={<Navigate to="account" />} />
</Routes>
<AccountSettings />
<AgencySettings />
<AgencySettingsTeamManagement />
</ContentDisplay>
</SettingsContainer>
);
Expand Down

0 comments on commit 54373c1

Please sign in to comment.