27 lines
685 B
TypeScript
Executable File
27 lines
685 B
TypeScript
Executable File
"use client";
|
|
|
|
import { deleteAllGameSystems } from "@/actions/GameSystems/deleteAll";
|
|
import { DevTool } from "@/components/devtools/DevTool";
|
|
import { useRouter } from "next/navigation";
|
|
import { FC, PropsWithChildren } from "react";
|
|
|
|
export const GameSystemsClient: FC<PropsWithChildren> = ({ children }) => {
|
|
const router = useRouter();
|
|
// DEV TOOL ONLY
|
|
async function deleteAll() {
|
|
await deleteAllGameSystems();
|
|
router.refresh();
|
|
}
|
|
|
|
return (
|
|
<>
|
|
<DevTool id="game-system-home">
|
|
<button onClick={deleteAll} className="btn-primary bg-lime-600">
|
|
Delete All Game Systems
|
|
</button>
|
|
</DevTool>
|
|
{children}
|
|
</>
|
|
);
|
|
};
|