diff --git a/components/Chart.js b/components/Chart.js index 887e6c46..df7d1dd4 100644 --- a/components/Chart.js +++ b/components/Chart.js @@ -95,13 +95,16 @@ const Chart = memo(function Chart({ )} {error && ( - - Error: {error.message} - -
{JSON.stringify(error, null, 2)}
- + <> +
+ + Error: {error.message} + +
{JSON.stringify(error, null, 2)}
+
+ } /> )} diff --git a/components/ConditionalWrapper.js b/components/ConditionalWrapper.js deleted file mode 100644 index 19dd698f..00000000 --- a/components/ConditionalWrapper.js +++ /dev/null @@ -1,12 +0,0 @@ -// import type { ReactNode } from 'react' - -// type ConditionalWrapperProps = { -// condition: boolean -// wrapper: (children: ReactNode) => ReactNode -// children: ReactNode -// } - -const ConditionalWrapper = ({ condition, wrapper, children }) => - condition ? wrapper(children) : children - -export default ConditionalWrapper diff --git a/components/DomainChart.js b/components/DomainChart.js index bbb7db30..44c7a067 100644 --- a/components/DomainChart.js +++ b/components/DomainChart.js @@ -75,13 +75,16 @@ const Chart = memo(function Chart({ queryParams = {}, setState }) { {error && ( - - Error: {error.message} - -
{JSON.stringify(error, null, 2)}
- + <> +
+ + Error: {error.message} + +
{JSON.stringify(error, null, 2)}
+
+ } /> )} diff --git a/components/Layout.js b/components/Layout.js index 39eac94a..1b497263 100644 --- a/components/Layout.js +++ b/components/Layout.js @@ -4,12 +4,11 @@ import { useMemo } from 'react' import { StyledStickyNavBar } from 'components/SharedStyledComponents' import { UserProvider } from 'hooks/useUser' import { useRouter } from 'next/router' -import ConditionalWrapper from './ConditionalWrapper' import Footer from './Footer' import Header from './Header' import NavBar from './NavBar' -const Layout = ({ children, isEmbeddedView }) => { +const Layout = ({ children }) => { const { pathname } = useRouter() const navbarColor = useMemo(() => { @@ -32,28 +31,23 @@ const Layout = ({ children, isEmbeddedView }) => { return ( -
+
- {!isEmbeddedView && ( - ( - {children} - )} - > + {navbarSticky ? ( + - + + ) : ( + )}
{children}
- {!isEmbeddedView && ( -
-
-
- )} +
+
+
) diff --git a/components/NavBar.js b/components/NavBar.js index 20cda3fb..a459e0f8 100644 --- a/components/NavBar.js +++ b/components/NavBar.js @@ -182,7 +182,7 @@ export const NavBar = ({ color }) => {
)}
a]:border-black [&>a]:hover:border-black [&>*]:opacity-100 [&>*]:text-black [&>*]:hover:text-black'}`} + className={`flex gap-4 lg:gap-8 ${showMenu && 'pt-2 flex-col items-start [&>a]:border-black [&>a]:hover:border-black [&>*]:opacity-100 [&>*]:text-black [&>*]:hover:text-black'}`} > } diff --git a/components/SocialButtons.js b/components/SocialButtons.js index 566c25dc..d3306373 100644 --- a/components/SocialButtons.js +++ b/components/SocialButtons.js @@ -6,9 +6,9 @@ const SocialButtons = ({ url }) => { const intl = useIntl() return ( -
+
-
+
{intl.formatMessage( { id: 'SocialButtons.CTA' }, { diff --git a/components/aggregation/mat/Filters.js b/components/aggregation/mat/Filters.js index 8e72cd8c..68f7a22d 100644 --- a/components/aggregation/mat/Filters.js +++ b/components/aggregation/mat/Filters.js @@ -312,7 +312,10 @@ const Filters = ({ data = [], tableData, setDataForCharts, query }) => { }) return ( - +