Files
yaak-mountain-loop/src-web/components/IsDev.tsx
2024-05-22 23:14:53 -07:00

16 lines
287 B
TypeScript

import type { ReactNode } from 'react';
import { useAppInfo } from '../hooks/useAppInfo';
interface Props {
children: ReactNode;
}
export function IsDev({ children }: Props) {
const appInfo = useAppInfo();
if (!appInfo?.isDev) {
return null;
}
return <>{children}</>;
}