Skip to content

Commit

Permalink
Add loading state for edit StackPage in PagesPage
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasdax98 committed Feb 19, 2024
1 parent 737ab3b commit fe776b4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/pink-rules-promise.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@comet/cms-admin": patch
---

Prevent flash of "Document not found" error message when reloading the page editor
4 changes: 4 additions & 0 deletions packages/admin/cms-admin/src/pages/pagesPage/PagesPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,10 @@ export function PagesPage({
{(selectedId) => {
const page = data?.pages.find((page) => page.id == selectedId);

if (loading) {
return <Loading behavior="fillPageHeight" />;
}

if (!page) {
return (
<MainContent>
Expand Down

0 comments on commit fe776b4

Please sign in to comment.