Skip to content

Commit

Permalink
fix: hideFooter prop name, small cleanup (#1315)
Browse files Browse the repository at this point in the history
  • Loading branch information
AliceR authored Dec 12, 2024
2 parents 4bdf994 + fe545d4 commit 02e5b61
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 33 deletions.
2 changes: 2 additions & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,7 @@ GOOGLE_FORM = 'https://docs.google.com/forms/d/e/1FAIpQLSfGcd3FDsM3kQIOVKjzdPn4f

SHOW_CONFIGURABLE_COLOR_MAP = 'TRUE'

# Enables the refactor page header component that uses the USWDS design system
ENABLE_USWDS_PAGE_HEADER = 'TRUE'
# Enables the refactor page footer component that uses the USWDS design system
ENABLE_USWDS_PAGE_FOOTER = 'TRUE'
2 changes: 1 addition & 1 deletion app/scripts/components/common/layout-root/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ function LayoutRoot(props: { children?: ReactNode }) {
primarySection={{
footerPrimaryContactItems,
footerPrimaryNavItems
}} // @ts-expect-error: NEED TO DELETE
}}
hideFooter={hideFooter}
/>
) : (
Expand Down
10 changes: 5 additions & 5 deletions app/scripts/components/common/page-footer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ import './styles.scss';
interface PageFooterProps {
primarySection: any;
settings: any;
hidefooter?: boolean;
hideFooter?: boolean;
}
//TODO: clean up PageFooterProps
//TODO: clean up PageFooterProps, Unexpected any. Specify a different interface.

export default function PageFooter({
settings,
primarySection,
hidefooter
hideFooter
}: PageFooterProps) {
// console.log(settings, primarySection, hidefooter);
const returnToTopButton = () => {
return (
<div
Expand All @@ -42,7 +42,7 @@ export default function PageFooter({
<USWDSFooter
size='slim'
returnToTop={returnToTop && returnToTopButton()}
className={hidefooter && 'display-none'}
className={hideFooter && 'display-none'}
primary={
<div
id='footer_primary_container'
Expand Down
27 changes: 0 additions & 27 deletions app/scripts/components/common/page-footer/styles.scss
Original file line number Diff line number Diff line change
@@ -1,31 +1,5 @@
@use '$styles/veda-ui-theme-vars.scss' as themeVars;

#logo-container {
display: flex;
font-family: themeVars.$veda-uswds-basefont-sans;
gap: themeVars.$veda-uswds-spacing-105;

#logo-container-link {
display: flex;
align-items: center;
gap: themeVars.$veda-uswds-spacing-105;
font-weight: themeVars.$veda-uswds-fontweight-bold;
font-size: themeVars.$veda-uswds-fontsize-lg;
}

#nasa-logo-pos {
opacity: 1;
transform: translate(0, -100%);
/* TODO: Fix the svg to not require any styles!
* - set opacity to 1 in svg and fix translation
*/
}

svg {
height: 2.75rem;
width: auto;
}
}
.footer-text {
color: white;
align-self: center;
Expand All @@ -50,7 +24,6 @@
.usa-footer__primary-section {
background-color: themeVars.$veda-uswds-color-base-lightest;
text-underline-offset: themeVars.$veda-uswds-spacing-5;

}

#mail_icon {
Expand Down

0 comments on commit 02e5b61

Please sign in to comment.