diff --git a/src/App.jsx b/src/App.jsx index 8925836..3a445ea 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -1,6 +1,6 @@ import React, { useState, useMemo } from "react" import { createRoot } from 'react-dom/client' -import { createHashRouter, RouterProvider, Outlet, Link } from "react-router-dom" +import { createHashRouter, RouterProvider, Outlet, NavLink } from "react-router-dom" import { FretboardCtrl, Note, Scale } from "./musictheory.js" import { Fretboard, CircleOfFifths, ChromaticNoteCircle } from "./Fretboard.jsx" import { Row } from "./Utils.jsx" @@ -23,6 +23,15 @@ const HomePage = () => { ) } +const NavbarLink = ({to, children}) => { + const className = "block py-2 px-3 rounded" + const classNameActive = className + " text-blue-500 border-red" + const classNameInactive = className + " text-white" + return ( + isActive ? classNameActive : classNameInactive}>{children} + ) +} + // Taken from https://flowbite.com/docs/components/navbar/#default-navbar const Navbar = () => (