Add link to docs root to docs sidebar nav

This commit is contained in:
kitajchuk
2021-04-07 07:28:47 -07:00
parent 7006bb380e
commit 75679e6cdc
3 changed files with 19 additions and 1 deletions
+8
View File
@@ -9,6 +9,7 @@ import { useRouter } from 'next/router';
import Layout from '../../components/layout';
import { Icon } from '../../components/jambonz-ui';
import { getData, getDocs, getDocsPaths } from '../../lib/data';
import { docsObj } from '../../lib/vars';
function Sidebar({data}) {
const router = useRouter();
@@ -32,6 +33,13 @@ function Sidebar({data}) {
return (
<nav className="docs__navi">
<div className="docs__link">
<Link href={docsObj.link}>
<a className="m">
<strong>{docsObj.label}</strong>
</a>
</Link>
</div>
<ul className="docs__list">
{data.navi.map((item) => {
const isActiveToggle = (active[item.path] ? true : false);