mirror of
https://github.com/decolua/9router.git
synced 2026-05-08 12:01:28 +00:00
feat: implement lazy loading for UsagePage with suspense fallback (#136)
Co-authored-by: zx <me@char.moe>
This commit is contained in:
@@ -7,6 +7,14 @@ import ProviderLimits from "./components/ProviderLimits";
|
|||||||
import RequestDetailsTab from "./components/RequestDetailsTab";
|
import RequestDetailsTab from "./components/RequestDetailsTab";
|
||||||
|
|
||||||
export default function UsagePage() {
|
export default function UsagePage() {
|
||||||
|
return (
|
||||||
|
<Suspense fallback={<CardSkeleton />}>
|
||||||
|
<UsagePageContent />
|
||||||
|
</Suspense>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
function UsagePageContent() {
|
||||||
const searchParams = useSearchParams();
|
const searchParams = useSearchParams();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const [activeTab, setActiveTab] = useState(searchParams.get("tab") || "overview");
|
const [activeTab, setActiveTab] = useState(searchParams.get("tab") || "overview");
|
||||||
|
|||||||
Reference in New Issue
Block a user