Admin: Berichten-scherm met formulierschakelaar, lijst, detail en opnieuw mailen (CMS-U6)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-10 22:42:33 +01:00
co-authored by Claude Sonnet 5.5
parent 0d729b6413
commit fd13647139
22 changed files with 1675 additions and 10 deletions
@@ -0,0 +1,22 @@
import type { ReactNode } from 'react';
import { NotFoundPage } from '@/pages/NotFoundPage';
import { useContactSettings } from '../services/useContactSettings';
/**
* The module can be loaded while the management routes are closed (host switch off: every route answers 404 with an
* empty body). In that case the screen does not exist: the usual "not found" page is shown.
*/
export function ContactAvailabilityGuard({ children }: { children: ReactNode }) {
const { data, isPending, isError } = useContactSettings();
if (isPending) {
return (
<div className="flex min-h-40 items-center justify-center text-muted-foreground">
<span className="h-5 w-5 animate-spin rounded-full border-2 border-primary border-t-transparent" />
</div>
);
}
if (isError || data === null) return <NotFoundPage />;
return <>{children}</>;
}