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

8395 [Manage Public Key] Add new route, and basic page #8665

Merged
merged 8 commits into from
Mar 10, 2023
5 changes: 5 additions & 0 deletions frontend-react/src/AppRouter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import { EditReceiverSettingsWithAuth } from "./components/Admin/EditReceiverSet
import { AdminRevHistoryWithAuth } from "./pages/admin/AdminRevHistory";
import { ErrorNoPage } from "./pages/error/legacy-content/ErrorNoPage";
import { MessageDetailsWithAuth } from "./components/MessageTracker/MessageDetails";
import { ManagePublicKeyWithAuth } from "./components/ManagePublicKey/ManagePublicKey";

export enum FeatureName {
DAILY_DATA = "Daily Data",
Expand Down Expand Up @@ -106,6 +107,10 @@ export const appRoutes = [
path: "/admin/revisionhistory/org/:org/settingtype/:settingType",
element: <AdminRevHistoryWithAuth />,
},
{
path: "/resources/manage-public-key",
element: <ManagePublicKeyWithAuth />,
},
{ path: "/file-handler/validate", element: <ValidateWithAuth /> },
/* Handles any undefined route */
{ path: "*", element: <ErrorNoPage /> },
Expand Down
25 changes: 25 additions & 0 deletions frontend-react/src/components/ManagePublicKey/ManagePublicKey.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import React from "react";

import { AuthElement } from "../AuthElement";
import { withCatchAndSuspense } from "../RSErrorBoundary";
import { MemberType } from "../../hooks/UseOktaMemberships";
import { GridContainer } from "@trussworks/react-uswds";

export function ManagePublicKey() {
return (
<GridContainer className="padding-bottom-5 tablet:padding-top-6">
<h1 className="margin-top-0 margin-bottom-5">Manage Public Key</h1>
<p className="font-sans-md">
Send your public key to begin the REST API authentication
process.
</p>
</GridContainer>
);
}

export const ManagePublicKeyWithAuth = () => (
<AuthElement
element={withCatchAndSuspense(<ManagePublicKey />)}
requiredUserType={MemberType.SENDER}
/>
);