83bc1c616 days ago26 lines · 634 B| 1 | import { viewPaths } from "@better-auth-ui/core"; |
| 2 | import { notFound } |
| 3 | |
| 4 | import { Settings } |
| 5 | |
| 6 | // Plugins add their own tabs, and the organization plugin's is `organizations`. |
| 7 | const validSettingsPaths = new |
| 8 | ...Object.values( |
| 9 | "organizations", |
| 10 | ]); |
| 11 | |
| 12 | export default async function |
| 13 | params, |
| 14 | }: PageProps< |
| 15 | const { path |
| 16 | |
| 17 | if (!validSettingsPaths.has |
| 18 | notFound(); |
| 19 | } |
| 20 | |
| 21 | return ( |
| 22 | <div className="mx-auto w-full max-w-3xl |
| 23 | <Settings path={ |
| 24 | </div> |
| 25 | ); |
| 26 | } |