Skip to content

Commit b67b308

Browse files
committed
(feature) move api keys to settings page
1 parent 8a4ee60 commit b67b308

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

frontend/src/components/Sidebar/NavLinkUtils.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { AiFillSecurityScan } from "@react-icons/all-files/ai/AiFillSecurityScan
77
import { AiFillApi } from "@react-icons/all-files/ai/AiFillApi"
88
import { HiShieldCheck } from "@react-icons/all-files/hi/HiShieldCheck"
99
import { IconType } from "@react-icons/all-files/lib"
10-
import { RiKey2Fill } from "@react-icons/all-files/ri/RiKey2Fill"
10+
import { FaWrench } from "@react-icons/all-files/fa/FaWrench"
1111

1212
export enum SideNavLinkDestination {
1313
Home,
@@ -18,7 +18,7 @@ export enum SideNavLinkDestination {
1818
SensitiveData,
1919
Vulnerabilities,
2020
Protection,
21-
Keys,
21+
Settings,
2222
}
2323

2424
export const sideNavDestinationToLabel: (
@@ -41,8 +41,8 @@ export const sideNavDestinationToLabel: (
4141
return "Connections"
4242
case SideNavLinkDestination.Protection:
4343
return "Protection"
44-
case SideNavLinkDestination.Keys:
45-
return "API Keys"
44+
case SideNavLinkDestination.Settings:
45+
return "Settings"
4646
default:
4747
throw Error(`No value mapped for ${dest}`)
4848
}
@@ -68,8 +68,8 @@ export const sideNavDestinationToIcon: (
6868
return FaShareAlt
6969
case SideNavLinkDestination.Protection:
7070
return HiShieldCheck
71-
case SideNavLinkDestination.Keys:
72-
return RiKey2Fill
71+
case SideNavLinkDestination.Settings:
72+
return FaWrench
7373
default:
7474
throw Error(`No value mapped for ${dest}`)
7575
}
@@ -95,8 +95,8 @@ export const sideNavDestinationToHref: (
9595
return "/connections"
9696
case SideNavLinkDestination.Protection:
9797
return "/protection"
98-
case SideNavLinkDestination.Keys:
99-
return "/keys"
98+
case SideNavLinkDestination.Settings:
99+
return "/settings"
100100
default:
101101
throw Error(`No value mapped for ${dest}`)
102102
}

frontend/src/components/Sidebar/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ const SideNavBar: React.FC<SideNavBarProps> = React.memo(({ currentTab }) => {
7878
isActive={currentTab === SideNavLinkDestination.Specs}
7979
/>
8080
<SideNavLink
81-
destination={SideNavLinkDestination.Keys}
82-
isActive={currentTab === SideNavLinkDestination.Keys}
81+
destination={SideNavLinkDestination.Settings}
82+
isActive={currentTab === SideNavLinkDestination.Settings}
8383
/>
8484
</Stack>
8585
<Spacer />

frontend/src/pages/keys.tsx renamed to frontend/src/pages/settings.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ const Keys = ({ keys: _keysString }) => {
5252
name: resp.name,
5353
identifier: resp.identifier,
5454
created: resp.created,
55-
for:resp.for
55+
for: resp.for,
5656
})
5757
console.log(new_keys)
5858
setKeys(new_keys)
@@ -67,7 +67,7 @@ const Keys = ({ keys: _keysString }) => {
6767
return (
6868
<SidebarLayoutShell
6969
title="API Specs"
70-
currentTab={SideNavLinkDestination.Specs}
70+
currentTab={SideNavLinkDestination.Settings}
7171
>
7272
<ContentContainer>
7373
<Heading fontWeight="medium" size="lg" mb="4">

0 commit comments

Comments
 (0)