diff --git a/packages/studiocms_dashboard/src/components/islands/content-mgmt/Edit.astro b/packages/studiocms_dashboard/src/components/islands/content-mgmt/Edit.astro index cb3e4ff54..f5bc7f537 100644 --- a/packages/studiocms_dashboard/src/components/islands/content-mgmt/Edit.astro +++ b/packages/studiocms_dashboard/src/components/islands/content-mgmt/Edit.astro @@ -20,13 +20,14 @@ import { StudioCMSRoutes } from 'studiocms:lib'; const editPageContent = document.getElementById('edit-page-content'); // get the page data - const pageDataResponse = await (await fetch(currentDisplayData.dataset.link)).json(); + const pageDataResponse = await (await fetch(editPageContainer.dataset.link)).json(); if (id) { // find the page data from the list const pageData = pageDataResponse.pages.find((page) => page.data.id === id); editPageContainer.style.display = 'block'; + editPageContent.style.display = 'block'; if (pageData) { editPageContent.innerHTML = ` @@ -44,6 +45,7 @@ import { StudioCMSRoutes } from 'studiocms:lib'; `; editPageContainer.style.display = 'none'; + editPageContent.style.display = 'none'; } }