Skip to content

Commit

Permalink
Page editor sync icon fixed for new dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
Rajat Saxena committed Nov 16, 2024
1 parent 9398027 commit 37c3b35
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
7 changes: 5 additions & 2 deletions apps/web/components/admin/page-editor/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ interface PageEditorProps {
address: Address;
profile: Profile;
dispatch?: AppDispatch;
loading?: boolean;
siteInfo: SiteInfo;
typefaces: Typeface[];
redirectTo?: string;
Expand All @@ -71,7 +70,6 @@ export default function PageEditor({
address,
profile,
dispatch,
loading = false,
redirectTo,
prefix,
state,
Expand All @@ -94,6 +92,7 @@ export default function PageEditor({
useState<LeftPaneContent>("none");
const [primaryFontFamily, setPrimaryFontFamily] =
useState("Roboto, sans-serif");
const [loading, setLoading] = useState(false);

const router = useRouter();
const debouncedSave = useCallback(
Expand Down Expand Up @@ -315,6 +314,8 @@ export default function PageEditor({
return;
}

setLoading(true); // Set loading to true before saving

const mutation = `
mutation updatePage(
$pageId: String!,
Expand Down Expand Up @@ -379,6 +380,8 @@ export default function PageEditor({
robotsAllowed,
},
});

setLoading(false); // Set loading to false after saving
};

const onWidgetSettingsChanged = (
Expand Down
1 change: 0 additions & 1 deletion apps/web/pages/dashboard/page/[id]/edit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ function EditPage({
}
address={address}
dispatch={dispatch}
loading={loading}
siteInfo={siteInfo}
typefaces={typefaces}
profile={profile}
Expand Down

0 comments on commit 37c3b35

Please sign in to comment.