mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-22 05:27:00 +02:00
chore(v2): temporarily add available urls to footer (#1022)
* chore(v2): temporarily add available urls to footer * use react-router Link * nits
This commit is contained in:
parent
f62029c30e
commit
c277f46a60
3 changed files with 33 additions and 4 deletions
|
@ -1,8 +1,9 @@
|
|||
import React from 'react';
|
||||
import {Link} from 'react-router-dom';
|
||||
|
||||
import styles from './styles.css';
|
||||
|
||||
function Footer() {
|
||||
function Footer(props) {
|
||||
return (
|
||||
<footer className={styles.footer}>
|
||||
<section className={styles.footerRow}>
|
||||
|
@ -66,6 +67,32 @@ function Footer() {
|
|||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
{/* This is for v2 development only to know which are the available routes */}
|
||||
<div className={styles.footerColumn}>
|
||||
<h3 className={styles.footerColumnTitle}>Pages</h3>
|
||||
<ul className={styles.footerList}>
|
||||
{props.pagesMetadatas.map(metadata => (
|
||||
<li key={metadata.permalink} className={styles.footerListItem}>
|
||||
<Link className={styles.footerLink} to={metadata.permalink}>
|
||||
{metadata.permalink}
|
||||
</Link>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</div>
|
||||
<div className={styles.footerColumn}>
|
||||
<h3 className={styles.footerColumnTitle}>Docs</h3>
|
||||
<ul className={styles.footerList}>
|
||||
{Object.values(props.docsMetadatas).map(metadata => (
|
||||
<li key={metadata.permalink} className={styles.footerListItem}>
|
||||
<Link className={styles.footerLink} to={metadata.permalink}>
|
||||
{metadata.permalink}
|
||||
</Link>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</div>
|
||||
{/* Remove above when launching v2 */}
|
||||
</section>
|
||||
<section className={styles.copyright}>
|
||||
<span>Copyright © {new Date().getFullYear()} Facebook Inc.</span>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue