feat(admin): organize command center controls and diagnostics
This commit is contained in:
1 parent
667637f8da
commit
51d1284950
5 files changed
+252
-113
No files matched your search
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,20 @@
|
||||
"use client";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { useTransition } from "react";
|
||||
import { Button } from "@/components/ui/button";
|
||||
export function RefreshStatus({ label }: { label: string }) {
|
||||
const router = useRouter();
|
||||
const [pending, startTransition] = useTransition();
|
||||
return (
|
||||
<Button
|
||||
type="button"
|
||||
variant="outline"
|
||||
disabled={pending}
|
||||
aria-busy={pending}
|
||||
onClick={() => startTransition(() => router.refresh())}
|
||||
>
|
||||
{pending ? "… " : ""}
|
||||
{label}
|
||||
</Button>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user