Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Publisher] Agency Settings: Settings page + Account Tab (2/5) #1256 #1306

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
22 changes: 22 additions & 0 deletions publisher/src/components/Global/GlobalStyles.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// Recidiviz - a data platform for criminal justice reform
// Copyright (C) 2023 Recidiviz, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
// =============================================================================

import styled from "styled-components/macro";

export const GlobalTitle = styled.div``;

export const GlobalDescription = styled.div``;
12 changes: 2 additions & 10 deletions publisher/src/components/Menu/Menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,16 +116,8 @@ const Menu: React.FC = () => {

const profileDropdownMetadata = [
{
label: "Your Account",
path: "./settings/account",
},
{
label: "Agency Settings",
path: "./settings/agency-settings",
},
{
label: "Team Management",
path: "./settings/team-management",
label: "Settings",
path: "./settings",
},
{
label: "Uploaded Files",
Expand Down
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