This commit is contained in:
Michael Schramm 2022-01-03 08:39:42 +01:00
parent ebc7d755b5
commit 92bc295580

View File

@ -55,7 +55,7 @@ const Index: NextPage = () => {
}
}
const { data, loading } = useFormQuery({
const { data, loading, error } = useFormQuery({
variables: {
id: router.query.id as string,
},
@ -116,6 +116,21 @@ const Index: NextPage = () => {
setSaving(false)
}
if (error) {
return (
<Structure
title={t('form:notFound')}
selected={'forms'}
breadcrumbs={[
{ href: '/admin', name: t('admin:home') },
{ href: '/admin/forms', name: t('admin:forms') },
]}
>
Not Found
</Structure>
)
}
return (
<Structure
loading={loading || saving}