feat(frontend): persist selected tab on admin settings page refresh

Store the selected tab of the admin settings page in the URL query string under the tab parameter. Defend against invalid values by validating it against the list of known tabs.
This commit is contained in:
ryan
2026-06-30 20:52:24 +08:00
parent 1855b48028
commit c293a255d0
2 changed files with 26 additions and 3 deletions
+13 -1
View File
@@ -1,8 +1,20 @@
// Copyright 2026 Arctel.net
// SPDX-License-Identifier: Apache-2.0
import {Suspense} from "react"
import {Loader2} from "lucide-react"
import {AdminSettingsPageClient} from "./page-client"
export default function AdminSettingsPage() {
return <AdminSettingsPageClient />
return (
<Suspense
fallback={
<div className="flex items-center justify-center min-h-[400px]">
<Loader2 className="size-6 animate-spin text-primary" />
</div>
}
>
<AdminSettingsPageClient />
</Suspense>
)
}