(
props: LayoutProps
)
| 21 | } |
| 22 | |
| 23 | export default async function SettingsLayout( |
| 24 | props: LayoutProps |
| 25 | ) { |
| 26 | const { |
| 27 | children |
| 28 | } = props; |
| 29 | |
| 30 | const session = await auth(); |
| 31 | if (!session) { |
| 32 | return redirect('/'); |
| 33 | } |
| 34 | |
| 35 | return ( |
| 36 | <div> |
| 37 | <main className="flex justify-center p-4"> |
| 38 | <div className="w-full max-w-3xl rounded-lg p-6"> |
| 39 | <div className="w-full rounded-lg">{children}</div> |
| 40 | </div> |
| 41 | </main> |
| 42 | </div> |
| 43 | ) |
| 44 | } |
| 45 | |
| 46 | export const getSidebarNavGroups = async () => |
| 47 | withAuth(async ({ role }) => { |
nothing calls this directly
no test coverage detected