Skip to content

Commit

Permalink
Add secondary footer content to footer config
Browse files Browse the repository at this point in the history
  • Loading branch information
AliceR committed Dec 17, 2024
1 parent d43dccc commit a9fd5ce
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 15 deletions.
7 changes: 3 additions & 4 deletions app/scripts/components/common/page-footer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,12 @@ export default function PageFooter({
<a id='logo-container-link' href='#'>
{logoSvg as JSX.Element}
<span className='footer-text'>
NASA EarthData 2024 • v0.17.0
{/* {version} */}
{secondarySection.division}{secondarySection.version}
</span>
</a>
</div>
<div className='grid-col-4 footer-text grid-gap-6 flex-justify-end'>
<span>NASA Official: </span>
<span>{secondarySection.title}: </span>
<a
key={secondarySection.type}
href={`mailto:${secondarySection.to}`}
Expand All @@ -132,7 +131,7 @@ export default function PageFooter({
className='margin-right-1 width-205 height-auto position-relative'
id='mail_icon'
/>
{secondarySection.title}
{secondarySection.name}
</a>
</div>
</div>
Expand Down
10 changes: 6 additions & 4 deletions app/scripts/components/common/page-header/default-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,12 @@ let defaultSubNavItems: (

const defaultFooterSettings = {
secondarySection: {
id: 'email test',
title: 'email test',
to: '/data-catalog',
type: 'Email'
division: 'NASA EarthData 2024',
version: 'BETA VERSION',
title: 'NASA Official',
name: 'Manil Maskey',
to: '[email protected]',
type: 'email'
},
returnToTop: true
};
Expand Down
11 changes: 5 additions & 6 deletions mock/veda.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
const dotEnvConfig = require('dotenv').config();
const { parsed: config } = dotEnvConfig;
function checkEnvFlag(value) {
return (value ?? '').toLowerCase() === 'true';
}

let mainNavItems = [
{
Expand Down Expand Up @@ -53,9 +50,11 @@ let mainNavItems = [

let footerSettings = {
secondarySection: {
id: 'stories',
title: 'email test',
to: '/data-catalog',
division: 'NASA EarthData 2024',
version: process.env.APP_VERSION ?? 'BETA VERSION',
title: 'NASA Official',
name: 'Manil Maskey',
to: '[email protected]',
type: 'email'
},
returnToTop: true
Expand Down
8 changes: 7 additions & 1 deletion parcel-resolver-veda/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -285,19 +285,25 @@ declare module 'veda' {
to: string;
type: 'internalLink';
}

interface ExternalNavLink {
id: string;
title: string;
href: string;
type: 'externalLink';
}

type NavLinkItem = ExternalNavLink | InternalNavLink;

export interface SecondarySection {
id: string;
division: string;
version: string;
title: string;
name: string;
to: string;
type: string;
}

export interface FooterSettings {
secondarySection: SecondarySection;
returnToTop: boolean;
Expand Down

0 comments on commit a9fd5ce

Please sign in to comment.