import type { UiProps } from '@jiotranslate/core-beta'; import { useEffect, useState } from 'react'; import { QueryProvider } from '../client/QueryProvider'; import { DialogProvider } from './dialogContext'; import { TranslationDialog } from './TranslationDialog'; export type ComponentDependencies = UiProps; export type KeyData = { key: null | string; defaultValue: undefined | string; fallbackNamespaces: string[]; namespace: string; }; export type Props = { uiProps: UiProps; keyData: KeyData; }; export const KeyDialog = ({ uiProps, keyData }: Props) => { const [open, setOpen] = useState(true); useEffect(() => { setOpen(true); }, [keyData]); function handleClose() { setOpen(false); } return ( {open && ( )} ); };