Skip to content

Commit 0755ef6

Browse files
committed
Pass svg logo as prop to footer
1 parent 89a9421 commit 0755ef6

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

app/scripts/components/common/layout-root/index.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import { getBannerFromVedaConfig, getCookieConsentFromVedaConfig } from 'veda';
1515
import MetaTags from '../meta-tags';
1616
import PageFooter from '../page-footer';
1717
import PageFooterLegacy from '../page-footer-legacy';
18+
import NasaLogoColor from '../nasa-logo-color';
1819

1920
const Banner = React.lazy(() => import('../banner'));
2021
const CookieConsent = React.lazy(() => import('../cookie-consent'));
@@ -115,6 +116,7 @@ function LayoutRoot(props: { children?: ReactNode }) {
115116
footerPrimaryNavItems
116117
}}
117118
hideFooter={hideFooter}
119+
logoSvg={<NasaLogoColor />}
118120
/>
119121
) : (
120122
<PageFooterLegacy hideFooter={hideFooter} />

app/scripts/components/common/page-footer/index.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import React from 'react';
22
import { Icon } from '@trussworks/react-uswds';
3-
//TO DO: need to move NasaLogoColor outside of component and pass down as props
4-
import NasaLogoColor from '../../common/nasa-logo-color';
3+
54
import {
65
USWDSFooter,
76
USWDSFooterNav,
@@ -13,13 +12,15 @@ interface PageFooterProps {
1312
primarySection: any;
1413
settings: any;
1514
hideFooter?: boolean;
15+
logoSvg?: SVGElement | JSX.Element;
1616
}
1717
//TODO: clean up PageFooterProps, Unexpected any. Specify a different interface.
1818

1919
export default function PageFooter({
2020
settings,
2121
primarySection,
22-
hideFooter
22+
hideFooter,
23+
logoSvg
2324
}: PageFooterProps) {
2425
const returnToTopButton = () => {
2526
return (
@@ -82,7 +83,7 @@ export default function PageFooter({
8283
<div id='footer_secondary_container' className='grid-row'>
8384
<div id='logo-container'>
8485
<a id='logo-container-link' href='#'>
85-
<NasaLogoColor />
86+
<>{logoSvg}</>
8687
<span className='footer-text'>
8788
NASA EarthData 2024 • v0.17.0
8889
{/* {version} */}

0 commit comments

Comments
 (0)