-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Remove veda dependency (#1398)
**Related Ticket:** #1360 This PR removes VEDA dependency from the registry build. Run `yarn buidlib`locally, see how less number of assets it builds to test it. (PageHeader and PageFooter were the root of the cause) --------- Co-authored-by: sandrahoang686 <[email protected]>
- Loading branch information
1 parent
23e6dcc
commit 5768355
Showing
7 changed files
with
45 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,18 @@ import { NavItem } from '../page-header/types.js'; | |
|
||
import PageFooter from './index'; | ||
|
||
const defaultFooterSetting = { | ||
secondarySection: { | ||
division: 'NASA EarthData 2024', | ||
version: 'BETA VERSION', | ||
title: 'NASA Official', | ||
name: 'Manil Maskey', | ||
to: '[email protected]', | ||
type: 'email' | ||
}, | ||
returnToTop: true | ||
}; | ||
|
||
const mockMainNavItems: NavItem[] = navItems.mainNavItems; | ||
const mockSubNavItems: NavItem[] = navItems.subNavItems; | ||
// const mockFooterSettings = footerSettings; | ||
|
@@ -40,6 +52,7 @@ describe('PageFooter', () => { | |
hideFooter={hideFooter} | ||
logoSvg={<NasaLogoColor />} | ||
linkProperties={mockLinkProperties} | ||
footerSettings={defaultFooterSetting} | ||
/> | ||
); | ||
const footerElement = document.querySelector('footer'); | ||
|
@@ -56,6 +69,7 @@ describe('PageFooter', () => { | |
hideFooter={hideFooter} | ||
logoSvg={<NasaLogoColor />} | ||
linkProperties={mockLinkProperties} | ||
footerSettings={defaultFooterSetting} | ||
/> | ||
); | ||
expect(screen.getByText('Data Catalog')).toBeInTheDocument(); | ||
|
@@ -89,6 +103,7 @@ describe('PageFooter dynamic settings', () => { | |
subNavItems={mockSubNavItems} | ||
hideFooter={true} | ||
logoSvg={<NasaLogoColor />} | ||
footerSettings={defaultFooterSetting} | ||
/> | ||
); | ||
const footerElement = document.querySelector('footer'); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 3 additions & 2 deletions
5
app/scripts/components/common/page-header/nav/nav-item-cta.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { useCallback, useState } from 'react'; | ||
|
||
export function useDisplay() { | ||
const [display, setDisplay] = useState<boolean>(false); | ||
|
||
return { | ||
isRevealed: display, | ||
show: useCallback(() => setDisplay(true), [setDisplay]), | ||
hide: useCallback(() => setDisplay(false), [setDisplay]) | ||
}; | ||
} |