Skip to content
This repository has been archived by the owner on Dec 2, 2023. It is now read-only.

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
wodka committed Jan 3, 2022
1 parent ebc7d75 commit 92bc295
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion pages/admin/forms/[id]/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const Index: NextPage = () => {
}
}

const { data, loading } = useFormQuery({
const { data, loading, error } = useFormQuery({
variables: {
id: router.query.id as string,
},
Expand Down Expand Up @@ -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}
Expand Down

0 comments on commit 92bc295

Please sign in to comment.