'use client'; import React from 'react'; import ThemeSwitcher from '@/Components/ThemeSwitcher'; import Link from 'next/link'; import { usePathname } from 'next/navigation'; import { urlList } from '@/app/urlList'; const searchPageName = (url: string) => { const page = urlList.find((it) => it.url === url); return page && page.name; }; const Header = () => { const path = usePathname(); const currModule = searchPageName(path); return (
{ currModule }