From b67b3085b0e257b64776b71df7ff4f9db5dc803a Mon Sep 17 00:00:00 2001 From: Ninad Sinha Date: Thu, 6 Oct 2022 23:08:35 +0530 Subject: [PATCH] (feature) move api keys to settings page --- frontend/src/components/Sidebar/NavLinkUtils.tsx | 16 ++++++++-------- frontend/src/components/Sidebar/index.tsx | 4 ++-- frontend/src/pages/{keys.tsx => settings.tsx} | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) rename frontend/src/pages/{keys.tsx => settings.tsx} (97%) diff --git a/frontend/src/components/Sidebar/NavLinkUtils.tsx b/frontend/src/components/Sidebar/NavLinkUtils.tsx index b5b0bacc..41dcb3dd 100644 --- a/frontend/src/components/Sidebar/NavLinkUtils.tsx +++ b/frontend/src/components/Sidebar/NavLinkUtils.tsx @@ -7,7 +7,7 @@ import { AiFillSecurityScan } from "@react-icons/all-files/ai/AiFillSecurityScan import { AiFillApi } from "@react-icons/all-files/ai/AiFillApi" import { HiShieldCheck } from "@react-icons/all-files/hi/HiShieldCheck" import { IconType } from "@react-icons/all-files/lib" -import { RiKey2Fill } from "@react-icons/all-files/ri/RiKey2Fill" +import { FaWrench } from "@react-icons/all-files/fa/FaWrench" export enum SideNavLinkDestination { Home, @@ -18,7 +18,7 @@ export enum SideNavLinkDestination { SensitiveData, Vulnerabilities, Protection, - Keys, + Settings, } export const sideNavDestinationToLabel: ( @@ -41,8 +41,8 @@ export const sideNavDestinationToLabel: ( return "Connections" case SideNavLinkDestination.Protection: return "Protection" - case SideNavLinkDestination.Keys: - return "API Keys" + case SideNavLinkDestination.Settings: + return "Settings" default: throw Error(`No value mapped for ${dest}`) } @@ -68,8 +68,8 @@ export const sideNavDestinationToIcon: ( return FaShareAlt case SideNavLinkDestination.Protection: return HiShieldCheck - case SideNavLinkDestination.Keys: - return RiKey2Fill + case SideNavLinkDestination.Settings: + return FaWrench default: throw Error(`No value mapped for ${dest}`) } @@ -95,8 +95,8 @@ export const sideNavDestinationToHref: ( return "/connections" case SideNavLinkDestination.Protection: return "/protection" - case SideNavLinkDestination.Keys: - return "/keys" + case SideNavLinkDestination.Settings: + return "/settings" default: throw Error(`No value mapped for ${dest}`) } diff --git a/frontend/src/components/Sidebar/index.tsx b/frontend/src/components/Sidebar/index.tsx index 54e9588a..90c616d3 100644 --- a/frontend/src/components/Sidebar/index.tsx +++ b/frontend/src/components/Sidebar/index.tsx @@ -78,8 +78,8 @@ const SideNavBar: React.FC = React.memo(({ currentTab }) => { isActive={currentTab === SideNavLinkDestination.Specs} /> diff --git a/frontend/src/pages/keys.tsx b/frontend/src/pages/settings.tsx similarity index 97% rename from frontend/src/pages/keys.tsx rename to frontend/src/pages/settings.tsx index 3591443d..3c127486 100644 --- a/frontend/src/pages/keys.tsx +++ b/frontend/src/pages/settings.tsx @@ -52,7 +52,7 @@ const Keys = ({ keys: _keysString }) => { name: resp.name, identifier: resp.identifier, created: resp.created, - for:resp.for + for: resp.for, }) console.log(new_keys) setKeys(new_keys) @@ -67,7 +67,7 @@ const Keys = ({ keys: _keysString }) => { return (