"use client";
import { usePathname } from "next/navigation";
import {
BreadcrumbItem,
BreadcrumbPage,
BreadcrumbSeparator,
} from "./ui/breadcrumb";
export default function TextFromPathname() {
const pathname = usePathname();
return (
<>
{pathname == "/" && (
<>
Home
>
)}
{pathname?.startsWith("/server") && (
<>
Server
{pathname.split("/server/")[1].split("/")[0]}
{pathname.endsWith("/historical-data") && (
<>
Historical Data
>
)}
>
)}
{pathname == "/account/favorites" && (
<>
Favorites
>
)}
>
);
}