JWTKeysLayout.tsx 964 B

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