Emma 56f0442d33 game systems: game system pages, game system create
components: moved DevTool to client component
2024-03-19 11:20:15 -06:00

17 lines
413 B
TypeScript

"use client";
import { FC, PropsWithChildren, use, useEffect } from "react";
import { DevToolboxContext } from "./context";
export const DevTool: FC<PropsWithChildren<{ id: string }>> = (
{ children, id },
) => {
const { addTool, removeTool } = use(DevToolboxContext);
useEffect(() => {
addTool(id, children);
(() => removeTool(id));
}, [addTool, children, id, removeTool]);
return <></>;
};