'use client'; import React, { useEffect, useState } from 'react'; import { Button } from '@nextui-org/react'; import Image from 'next/image'; import Link from 'next/link'; import ThemeSwitcher from '@/components/ThemeSwitcher'; import { usePathname } from 'next/navigation'; import { useScreenSizeTrigger } from '@/app/(pages)/public/screenSizeTrigger'; import { connections, entries } from '@/app/entries'; function Navbar() { const path = usePathname(); const [ shownPath, setShownPath ] = useState(path); useEffect(() => { let trimmed_path = path.split(`/`)[1]; if (trimmed_path === '') { setShownPath('HOME'); } else { setShownPath(trimmed_path.toUpperCase()); } }, [ path ]); const isMobile = useScreenSizeTrigger('lg'); return ( <>
{

Lumither Tao

Ad Astra

    { connections.map((conn, key) => (
  • )) }
    { entries.map((meta, key) => (
  • )) }

{ shownPath }

); } export default Navbar;