mediahub-fe/components/page-title.tsx

33 lines
691 B
TypeScript
Raw Normal View History

2024-11-28 17:23:53 +00:00
"use client";
import React from "react";
import DateRangePicker from "@/components/date-range-picker";
import { usePathname } from "@/components/navigation";
import { cn } from "@/lib/utils";
2024-11-26 03:09:48 +00:00
2024-11-28 17:23:53 +00:00
const PageTitle = ({
title,
className,
}: {
title?: string;
className?: string;
}) => {
const pathname = usePathname();
const name = pathname?.split("/").slice(1).join(" ");
2024-11-26 03:09:48 +00:00
2024-11-28 17:23:53 +00:00
return (
<div
className={cn(
"flex flex-wrap gap-4 items-center justify-between",
className
)}
>
<div className="text-2xl font-medium text-default-800 capitalize">
Dashboard
</div>
<DateRangePicker />
</div>
);
};
2024-11-26 03:09:48 +00:00
2024-11-28 17:23:53 +00:00
export default PageTitle;