import { Link, useLocation } from "react-router-dom"; interface LayoutProps { children: React.ReactNode; headerChart?: React.ReactNode; } export default function Layout({ children, headerChart }: LayoutProps) { const location = useLocation(); const isTracksPage = location.pathname.startsWith("/tracks"); const isAlbumsPage = location.pathname.startsWith("/albums"); return (
{headerChart && (
{headerChart}
)}

Listening History

fm.teal.alpha.feed.play

Recent Top Tracks Top Albums
{isTracksPage && (
All Time Daily Weekly Monthly
)} {isAlbumsPage && (
All Time Daily Weekly Monthly
)} {!isTracksPage && !isAlbumsPage &&
} {children}
); }