From d9c57aaccb42070392dae76fa0c110b344fe22e0 Mon Sep 17 00:00:00 2001 From: Daniel Gading Date: Mon, 18 Nov 2024 12:57:02 -0500 Subject: [PATCH 1/9] Move to context based pattern --- src/components/FeaturedDatasets/index.jsx | 6 +- src/components/Layout/index.jsx | 10 +- src/components/Resource/index.jsx | 22 +- src/templates/about/index.jsx | 6 +- src/templates/api/index.jsx | 6 +- src/templates/dataset/api.jsx | 32 +- src/templates/dataset/index.jsx | 354 +++++++++++++++------- src/templates/home/index.jsx | 90 ++---- src/templates/publishers/index.jsx | 4 +- src/templates/search/index.jsx | 51 +++- 10 files changed, 358 insertions(+), 223 deletions(-) diff --git a/src/components/FeaturedDatasets/index.jsx b/src/components/FeaturedDatasets/index.jsx index 845d4c8..927083d 100644 --- a/src/components/FeaturedDatasets/index.jsx +++ b/src/components/FeaturedDatasets/index.jsx @@ -2,7 +2,7 @@ import React from "react"; import PropTypes from "prop-types"; import excerpts from 'excerpts'; import { Link } from 'react-router-dom'; -import { Text } from "@civicactions/data-catalog-components"; +// import { Text } from "@civicactions/data-catalog-components"; import config from "../../assets/config"; import './featureddatasets.scss'; @@ -10,7 +10,7 @@ const FeaturedDatasets = ({ datasets }) => { return (

Featured Datasets

-
    + {/*
      {datasets.map((item) => (
    1. @@ -21,7 +21,7 @@ const FeaturedDatasets = ({ datasets }) => {
    2. ))} -
    +
*/}
); }; diff --git a/src/components/Layout/index.jsx b/src/components/Layout/index.jsx index 68778f5..81a8cd5 100644 --- a/src/components/Layout/index.jsx +++ b/src/components/Layout/index.jsx @@ -1,7 +1,7 @@ import React from "react"; import Helmet from "react-helmet"; -import { Link, NavLink } from 'react-router-dom'; -import { Header, NavBar, Footer } from "@civicactions/data-catalog-components"; +import { Link } from 'react-router-dom'; +// import { Header, NavBar, Footer } from "@civicactions/data-catalog-components"; import config from "../../assets/config.json"; import links from "../../assets/menu.json"; @@ -21,7 +21,7 @@ const Layout = ({ "lang": "en" }} /> -
+ {/*
( @@ -29,11 +29,11 @@ const Layout = ({ ))} customClasses={config.container} - /> + /> */}
{children}
-