From 2aa238b2014bfdff0fb30e3cdfdb59bdc009fcba Mon Sep 17 00:00:00 2001 From: Alexis Date: Fri, 23 Apr 2021 16:17:18 +0800 Subject: [PATCH] fix: using isResourcePage to determine page header --- src/layouts/EditPage.jsx | 1 + src/templates/SimplePage.jsx | 4 ++-- src/templates/pageComponents/PageHeader.jsx | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/layouts/EditPage.jsx b/src/layouts/EditPage.jsx index 872085ac4..2ee26d122 100644 --- a/src/layouts/EditPage.jsx +++ b/src/layouts/EditPage.jsx @@ -469,6 +469,7 @@ const EditPage = ({ match, isResourcePage, isCollectionPage, history, type }) => chunk={chunk} title={title} date={date} + isResourcePage={isResourcePage} resourceRoomName={deslugifyDirectory(resourceRoomName)} collection={resourceName} /> diff --git a/src/templates/SimplePage.jsx b/src/templates/SimplePage.jsx index 128f65807..083933e2a 100644 --- a/src/templates/SimplePage.jsx +++ b/src/templates/SimplePage.jsx @@ -3,9 +3,9 @@ import PropTypes from 'prop-types'; import PageHeader from './pageComponents/PageHeader'; // This following template was taken from the 'Simple Page' -const SimplePage = ({ chunk, title, date, collection, resourceRoomName }) => ( +const SimplePage = ({ chunk, title, date, collection, isResourcePage, resourceRoomName }) => (
- +
diff --git a/src/templates/pageComponents/PageHeader.jsx b/src/templates/pageComponents/PageHeader.jsx index 92a5fb84f..a25490c11 100644 --- a/src/templates/pageComponents/PageHeader.jsx +++ b/src/templates/pageComponents/PageHeader.jsx @@ -2,8 +2,8 @@ import React from 'react'; import PropTypes from 'prop-types'; import Breadcrumb from './Breadcrumb'; -const PageHeader = ({ title, date, collection, resourceRoomName }) => ( -
+const PageHeader = ({ title, date, collection, resourceRoomName, isResourcePage }) => ( +