2025-03-12 04:22:41 +00:00
|
|
|
import Link from "next/link";
|
|
|
|
import { cn } from "@/lib/utils";
|
2025-04-15 10:22:21 +00:00
|
|
|
import { useTranslations } from "next-intl";
|
2025-03-12 04:22:41 +00:00
|
|
|
import { ArrowLeftIcon } from "lucide-react";
|
2025-05-13 09:38:26 +00:00
|
|
|
import { TooltipButton } from "@/components/tooltip-button";
|
2025-03-12 04:22:41 +00:00
|
|
|
|
2025-05-13 08:43:01 +00:00
|
|
|
interface BackButtonProps {
|
2025-03-12 04:22:41 +00:00
|
|
|
href: string;
|
|
|
|
className?: string;
|
|
|
|
}
|
|
|
|
|
2025-05-13 08:43:01 +00:00
|
|
|
export const BackButton = ({ href, className }: BackButtonProps) => {
|
2025-04-15 10:22:21 +00:00
|
|
|
const t = useTranslations();
|
|
|
|
|
2025-03-12 04:22:41 +00:00
|
|
|
return (
|
2025-05-13 09:38:26 +00:00
|
|
|
<TooltipButton
|
|
|
|
tooltipContent={t("BackButton")}
|
|
|
|
className={cn("h-8 w-auto p-2", className)}
|
|
|
|
asChild
|
|
|
|
>
|
|
|
|
<Link href={href}>
|
|
|
|
<ArrowLeftIcon size={16} aria-hidden="true" />
|
|
|
|
</Link>
|
|
|
|
</TooltipButton>
|
2025-03-12 04:22:41 +00:00
|
|
|
);
|
2025-05-06 13:04:45 +00:00
|
|
|
};
|