Update footer

- add PEC
- add RFI
- add github link
This commit is contained in:
Vim USDS 2022-04-05 19:11:46 -07:00
commit 9eb79165eb
13 changed files with 415 additions and 56 deletions

View file

@ -13,6 +13,7 @@ import SurveyButton from '../SurveyButton';
// @ts-ignore
import whitehouseIcon from '../../images/eop-seal.svg';
import {PAGES_ENDPOINTS} from '../../data/constants';
import * as COMMON_COPY from '../../data/copy/common';
const J40Footer = () => {
@ -35,12 +36,28 @@ const J40Footer = () => {
],
[
intl.formatMessage(COMMON_COPY.FOOTER.MORE_INFO),
<LinkTypeWrapper
linkText={intl.formatMessage(COMMON_COPY.FOOTER.ENG_CAL)}
internal={true}
url={PAGES_ENDPOINTS.PUBLIC_ENG}
openUrlNewTab={false}
className={'footer-link-first-child'}
key={'publiceng'}
dataCy={hyphenizeString(COMMON_COPY.FOOTER.ENG_CAL.defaultMessage)}
/>,
<LinkTypeWrapper
linkText={intl.formatMessage(COMMON_COPY.FOOTER.RFI)}
internal={false}
url={intl.formatMessage(COMMON_COPY.FOOTER.RFI_LINK)}
openUrlNewTab={true}
key={'rfilink'}
dataCy={hyphenizeString(COMMON_COPY.FOOTER.RFI.defaultMessage)}
/>,
<LinkTypeWrapper
linkText={intl.formatMessage(COMMON_COPY.FOOTER.WHITEHOUSE)}
internal={false}
url={intl.formatMessage(COMMON_COPY.FOOTER.WHITEHOUSE_LINK)}
openUrlNewTab={true}
className={'footer-link-first-child'}
key={'whitehouselink2'}
dataCy={hyphenizeString(COMMON_COPY.FOOTER.WHITEHOUSE.defaultMessage)}
/>,
@ -60,19 +77,27 @@ const J40Footer = () => {
key={'privacylink'}
dataCy={hyphenizeString(COMMON_COPY.FOOTER.PRIVACY.defaultMessage)}
/>,
],
[
intl.formatMessage(COMMON_COPY.FOOTER.QUESTIONS),
<LinkTypeWrapper
linkText={intl.formatMessage(COMMON_COPY.FOOTER.FIND_CONTACT)}
internal={false}
url={intl.formatMessage(COMMON_COPY.FOOTER.FIND_CONTACT_LINK)}
openUrlNewTab={true}
className={'footer-link-first-child'}
key={'contactlink'}
dataCy={hyphenizeString(COMMON_COPY.FOOTER.FIND_CONTACT.defaultMessage)}
/>,
],
[
intl.formatMessage(COMMON_COPY.FOOTER.CONTRIBUTE),
<LinkTypeWrapper
linkText={intl.formatMessage(COMMON_COPY.FOOTER.GITHUB_LINK_TEXT)}
internal={false}
url={intl.formatMessage(COMMON_COPY.FOOTER.GITHUB_LINK)}
openUrlNewTab={true}
className={'footer-link-first-child'}
key={'contactlink'}
dataCy={hyphenizeString(COMMON_COPY.FOOTER.GITHUB_LINK_TEXT.defaultMessage)}
/>,
],
];
// see https://designsystem.digital.gov/components/footer/

View file

@ -79,7 +79,30 @@ exports[`J40Footer renders correctly 1`] = `
class="usa-footer__secondary-link"
>
<a
class="usa-link usa-link--external footer-link-first-child"
class="footer-link-first-child"
href="/en/public-engagement"
>
Engagement calender
</a>
</li>
<li
class="usa-footer__secondary-link"
>
<a
class="usa-link usa-link--external"
data-cy="request-for-infomation"
href="https://www.federalregister.gov/d/2022-03920"
rel="noreferrer"
target="_blank"
>
Request for Infomation
</a>
</li>
<li
class="usa-footer__secondary-link"
>
<a
class="usa-link usa-link--external"
data-cy="whitehouse-gov"
href="https://www.whitehouse.gov/"
rel="noreferrer"
@ -114,6 +137,19 @@ exports[`J40Footer renders correctly 1`] = `
Privacy Policy
</a>
</li>
<li
class="usa-footer__secondary-link"
>
<a
class="usa-link usa-link--external"
data-cy="find-a-contact-at-usa-gov"
href="https://www.usa.gov/"
rel="noreferrer"
target="_blank"
>
Find a contact at USA.gov
</a>
</li>
</ul>
</section>
</div>
@ -124,7 +160,7 @@ exports[`J40Footer renders correctly 1`] = `
<div
class="j40-h4"
>
Have a question about government services?
Want to contribute?
</div>
<ul
class="usa-list usa-list--unstyled"
@ -134,12 +170,12 @@ exports[`J40Footer renders correctly 1`] = `
>
<a
class="usa-link usa-link--external footer-link-first-child"
data-cy="find-a-contact-at-usa-gov"
href="https://www.usa.gov/"
data-cy="check-out-the-code-on-github"
href="https://github.com/usds/justice40-tool"
rel="noreferrer"
target="_blank"
>
Find a contact at USA.gov
Check out the code on GitHub
</a>
</li>
</ul>

View file

@ -31,7 +31,9 @@ interface ILinkTypeWrapper {
const LinkTypeWrapper = (props:ILinkTypeWrapper) => {
if (props.internal) {
return (
<Link to={`${props.url}`}>
<Link to={`${props.url}`}
className={props.className}
>
{props.linkText}
</Link>
);