diff --git a/src/pages/AdminEmailTemplates.tsx b/src/pages/AdminEmailTemplates.tsx index 3f47315..8c81147 100644 --- a/src/pages/AdminEmailTemplates.tsx +++ b/src/pages/AdminEmailTemplates.tsx @@ -9,7 +9,7 @@ import { EmailTemplateLanguageData, } from '../api/adminEmailTemplates'; import { AdminBackButton, BackIcon } from '../components/admin'; -import { useIsTelegram } from '../platform/hooks/usePlatform'; +import { useIsTelegram, usePlatform } from '../platform/hooks/usePlatform'; // Hook to check if on mobile function useIsMobile() { @@ -159,6 +159,7 @@ function TemplateEditor({ const { t } = useTranslation(); const navigate = useNavigate(); const queryClient = useQueryClient(); + const { dialog } = usePlatform(); const isTelegram = useIsTelegram(); const isMobile = useIsMobile(); const isPreviewDisabled = isTelegram || isMobile; @@ -171,7 +172,6 @@ function TemplateEditor({ type: 'success' | 'error' | 'info'; message: string; } | null>(null); - const [showPreviewAlert, setShowPreviewAlert] = useState(false); const textareaRef = useRef(null); const langData: EmailTemplateLanguageData | undefined = detail.languages[activeLang]; @@ -401,7 +401,10 @@ function TemplateEditor({ - - - - )} ); }