diff --git a/components/dynamic/DataProductsList/index.js b/components/dynamic/DataProductsList/index.js deleted file mode 100644 index 6fd00306..00000000 --- a/components/dynamic/DataProductsList/index.js +++ /dev/null @@ -1,65 +0,0 @@ -import PropTypes from "prop-types"; -import { useTranslation } from "react-i18next"; -import { Grid } from "@rubin-epo/epo-react-lib"; -import DataList from "@/dynamic/DataList"; -import Tile from "@/atomic/Tile"; -import { makeTruncatedString } from "@/lib/utils"; - -const DataProductsList = ({ - component, - excludeId = null, - header, - limit = 15, - button, - isWide = false, - isRelatedList = false, -}) => { - const { t } = useTranslation(); - const cols = limit === 4 ? 4 : 3; - - return ( - - {({ entries }) => ( - <> - {entries?.length > 0 && ( - - {entries.map(({ id, description, image, title, uri }) => ( - - ))} - - )} - - )} - - ); -}; - -DataProductsList.propTypes = { - component: PropTypes.string, - excludeId: PropTypes.string, - limit: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), - header: PropTypes.string, - button: PropTypes.object, - isWide: PropTypes.bool, - isRelatedList: PropTypes.bool, -}; - -export default DataProductsList; diff --git a/components/templates/DataProductPage/index.js b/components/templates/DataProductPage/index.js deleted file mode 100644 index 178d3299..00000000 --- a/components/templates/DataProductPage/index.js +++ /dev/null @@ -1,88 +0,0 @@ -import PropTypes from "prop-types"; -import { useTranslation } from "react-i18next"; -import { Container } from "@rubin-epo/epo-react-lib"; -import { useCustomBreadcrumbs } from "@/lib/utils"; -import Body from "@/global/Body"; -import PageContent from "@/page/PageContent"; -import MediaAside from "@/components/page/Aside/patterns/Media"; -import ContentBlockFactory from "@/factories/ContentBlockFactory"; -import DataProductsList from "@/components/dynamic/DataProductsList"; -import Breadcrumbs from "@/page/Breadcrumbs"; - -const DataProductPage = ({ - data: { - id, - uri, - title, - description, - featuredImage = [], - sidebarAssets = [], - contentBlocks = [], - }, -}) => { - const { t } = useTranslation(); - - const bodyProps = { - description, - featuredImage, - title, - }; - const pageLink = { - id, - uri, - title, - }; - const breadcrumbs = useCustomBreadcrumbs("For Scientists"); - const backPage = breadcrumbs[breadcrumbs.length - 1]; - - return ( - - - - } - footer={ - - } - > - -

{title}

-
- {contentBlocks.length > 0 && - [...contentBlocks].map((block) => { - if (!block.id || !block.typeHandle) return null; - return ( - - ); - })} -
- - ); -}; - -DataProductPage.displayName = "Template.DataProductPage"; - -DataProductPage.propTypes = { - data: PropTypes.object, -}; - -export default DataProductPage; diff --git a/components/templates/Page/index.js b/components/templates/Page/index.js index bf1a551a..7d954c17 100644 --- a/components/templates/Page/index.js +++ b/components/templates/Page/index.js @@ -19,6 +19,7 @@ import GuideNavigation from "@/components/layout/GuideNavigation"; import SiblingNavigation from "@/components/layout/SiblingNavigation"; import NestedContext from "@/contexts/Nested"; import PageContent from "@/page/PageContent"; +import MediaAside from "@/components/page/Aside/patterns/Media"; import { FilterParamsProvider } from "@/contexts/FilterParams"; export default function Page({ @@ -43,6 +44,8 @@ export default function Page({ subHeroColorScheme, parent, showGuideNav, + showSidebar, + sidebarAssets = [], investigation, siblings, childNavigation, @@ -143,6 +146,14 @@ export default function Page({ + ) + } {...{ focalPointX, focalPointY }} >