danmu-sim/components/back-button.tsx

22 lines
331 B
TypeScript
Raw Normal View History

2024-04-06 02:35:31 +08:00
"use client";
import { useRouter } from "next/navigation";
export default function BackButton({
className,
}: {
className?: string | undefined;
}) {
const router = useRouter();
return (
<button
className={className}
onClick={() => {
router.back();
}}
>
退
</button>
);
}