JWTKeysLayout.tsx36 lines · main
1import { useParams } from 'common'
2import { PropsWithChildren } from 'react'
3
4import { PageLayout } from '@/components/layouts/PageLayout/PageLayout'
5import { ScaffoldContainer } from '@/components/layouts/Scaffold'
6
7const JWTKeysLayout = ({ children }: PropsWithChildren) => {
8 const { ref: projectRef } = useParams()
9
10 const navigationItems = [
11 {
12 label: 'JWT Signing Keys',
13 href: `/project/${projectRef}/settings/jwt`,
14 id: 'signing-keys',
15 },
16 {
17 label: 'Legacy JWT Secret',
18 href: `/project/${projectRef}/settings/jwt/legacy`,
19 id: 'legacy-jwt-keys',
20 },
21 ]
22
23 return (
24 <PageLayout
25 title="JWT Keys"
26 subtitle="Control the keys used to sign JSON Web Tokens for your project"
27 navigationItems={navigationItems}
28 >
29 <ScaffoldContainer className="flex flex-col py-8 gap-8" bottomPadding>
30 {children}
31 </ScaffoldContainer>
32 </PageLayout>
33 )
34}
35
36export default JWTKeysLayout