aboutsummaryrefslogtreecommitdiffstats
path: root/apps/web/components/ui/back-button.tsx
blob: 46c99f7c6e774cc449d3b220d6e0f0f771901793 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
"use client";

import { useRouter } from "next/navigation";

import type { ButtonProps } from "./button";
import { Button } from "./button";

export function BackButton({ ...props }: ButtonProps) {
  const router = useRouter();
  return <Button {...props} onClick={() => router.back()} />;
}