Skip to content

Commit

Permalink
fix: 馃悰 form editor page break sometime
Browse files Browse the repository at this point in the history
  • Loading branch information
growupanand committed Feb 27, 2024
1 parent 37f4203 commit bf718b7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ type Props = {
};

function FormPageHeader({ formId }: Readonly<Props>) {
const { organization } = useOrganization();
const { organization, isLoaded } = useOrganization();
const { data, isLoading } = api.form.getOneWithWorkspace.useQuery({
id: formId,
});

if (isLoading) {
if (isLoading || !isLoaded) {
return <FormEditorPageHeaderSkeleton />;
}

Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/app/(protectedPage)/forms/[formId]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ type Props = {
};

export default function FormPage({ params: { formId } }: Props) {
const { organization } = useOrganization();
const { organization, isLoaded } = useOrganization();
const { isLoading, data } = api.form.getOneWithFields.useQuery({
id: formId,
});

if (isLoading) {
if (isLoading || !isLoaded) {
return <FormPageLoading formId={formId} />;
}

Expand Down

0 comments on commit bf718b7

Please sign in to comment.