Skip to content
Snippets Groups Projects
Commit 6ea70ac1 authored by Aggarwal Himanshu's avatar Aggarwal Himanshu
Browse files

Fix sidebar width; Add way to change active item on sidebar

parent 7cf1d879
No related branches found
No related tags found
2 merge requests!7Merge develop to main,!2Draft: Add Compare Chart Feature
......@@ -4,9 +4,9 @@ import Link from "next/link";
import classNames from "classnames";
import { ChartBarIcon, GlobeIcon } from "@heroicons/react/outline";
function Sidebar() {
function Sidebar({ active }) {
return (
<div className="w-64 dark:text-white">
<div className="w-64 min-w-[16rem] dark:text-white">
{/* Sidebar Head */}
<span className="flex justify-center items-center mt-5" id="crypto-logo">
<Image
......@@ -27,13 +27,13 @@ function Sidebar() {
title="Home"
icon={<GlobeIcon className="w-6 h-6" />}
to="/"
active={true}
active={active === "home"}
/>
<SidebarItem
title="Compare"
icon={<ChartBarIcon className="w-6 h-6" />}
to="/map"
active={false}
to="/compare"
active={active === "compare"}
/>
</nav>
</div>
......
......@@ -47,7 +47,7 @@ export default function Home() {
<link rel="icon" href="/favicon.ico" />
</Head>
<Wrapper>
<Sidebar />
<Sidebar active="home" />
<Main>
<Container>
{/* Header */}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment