"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.endsWith("/customize") && ( <> Customize )} )} {pathname == "/account/favorites" && ( <> Favorites )} {pathname == "/account/claim-account" && ( <> Claim Minecraft Account )} {pathname == "/account/settings" && ( <> Settings )} {pathname == "/legal/external-content-agreement" && ( <> Legal ECA Agreement )} ); }