Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"gatsby-plugin-manifest": "^2.3.6",
"gatsby-plugin-offline": "^3.1.2",
"gatsby-plugin-react-helmet": "^3.2.4",
"gatsby-plugin-sass": "^2.2.4",
"gatsby-plugin-sass": "2.3.0",
"gatsby-plugin-sharp": "^2.5.4",
"gatsby-plugin-sitemap": "^2.0.5",
"gatsby-plugin-typescript": "^2.3.1",
Expand Down
46 changes: 7 additions & 39 deletions src/components/Footer/__tests__/__snapshots__/footer.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -7,82 +7,50 @@ exports[`Tests for Footer component renders correctly 1`] = `
<ul
className="footer__left"
>
<li>
<div
style={
Object {
"position": "relative",
}
}
>
<button
css={
Object {
"map": undefined,
"name": "45tpuz",
"next": undefined,
"styles": "
border: none;
color: var(--color-text-accent);
",
}
}
onBlur={[Function]}
onClick={[Function]}
type="button"
>
English

<span>
</span>
</button>
</div>
</li>
<li>
<a
className="footer__link"
href="/"
href="https://nodejs.org/en/about/trademark/"
>
Trademark Policy
</a>
</li>
<li>
<a
className="footer__link"
href="/"
href="https://nodejs.org/en/about/privacy/"
>
Privacy Policy
</a>
</li>
<li>
<a
className="footer__link"
href="/"
href="https://github.com/openjs-foundation/cross-project-council/blob/master/CODE_OF_CONDUCT.md#contributor-covenant-code-of-conduct"
>
Code of Conduct
</a>
</li>
<li>
<a
className="footer__link"
href="/"
href="https://nodejs.org/en/security/"
>
Security Reporting
</a>
</li>
<li>
<a
className="footer__link"
href="/"
href="https://nodejs.org/en/about/"
>
About
</a>
</li>
<li>
<a
className="footer__link"
href="/"
href="https://nodejs.org/en/blog/"
>
Blog
</a>
Expand All @@ -92,7 +60,7 @@ exports[`Tests for Footer component renders correctly 1`] = `
className="footer__right"
>
<li>
© 2019 Node.js Foundation
© OpenJS Foundation
</li>
<li>
<a
Expand Down
41 changes: 24 additions & 17 deletions src/components/Footer/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React, { useState } from 'react';
import { Link } from 'gatsby';
import { css, SerializedStyles } from '@emotion/core';

const dropDownData = [
Expand Down Expand Up @@ -63,6 +62,8 @@ export interface DropDownState {
shouldDropDownBlur: boolean;
}

// TODO When we start on translation work, reimplement the dropdown for language selection
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const FooterDropDown: React.FC = (): JSX.Element => {
const [state, setState] = useState<DropDownState>({
active: 3, // Index of currently selected element.
Expand Down Expand Up @@ -144,41 +145,47 @@ function Footer(): JSX.Element {
<footer className="footer">
<ul className="footer__left">
<li>
<FooterDropDown />
</li>
<li>
<Link className="footer__link" to="/">
<a
className="footer__link"
href="https://nodejs.org/en/about/trademark/"
>
Trademark Policy
</Link>
</a>
</li>
<li>
<Link className="footer__link" to="/">
<a
className="footer__link"
href="https://nodejs.org/en/about/privacy/"
>
Privacy Policy
</Link>
</a>
</li>
<li>
<Link className="footer__link" to="/">
<a
className="footer__link"
href="https://github.com/openjs-foundation/cross-project-council/blob/master/CODE_OF_CONDUCT.md#contributor-covenant-code-of-conduct"
>
Code of Conduct
</Link>
</a>
</li>
<li>
<Link className="footer__link" to="/">
<a className="footer__link" href="https://nodejs.org/en/security/">
Security Reporting
</Link>
</a>
</li>
<li>
<Link className="footer__link" to="/">
<a className="footer__link" href="https://nodejs.org/en/about/">
About
</Link>
</a>
</li>
<li>
<Link className="footer__link" to="/">
<a className="footer__link" href="https://nodejs.org/en/blog/">
Blog
</Link>
</a>
</li>
</ul>
<ul className="footer__right">
<li>&copy; 2019 Node.js Foundation</li>
<li>&copy; OpenJS Foundation</li>
<li>
<a
target="_blank"
Expand Down