cleanup backnavigation

This commit is contained in:
peintnermax
2024-07-16 17:16:35 +02:00
parent dc2ec8a18f
commit e9523a6530

View File

@@ -1,12 +1,9 @@
"use client";
import Link from "next/link";
import { Button, ButtonVariants } from "./Button";
type Props = { hasBack?: boolean };
export default function BackButton({ hasBack }: Props) {
return hasBack || history?.length > 1 ? (
export default function BackButton() {
return history && history.length > 1 ? (
<Button
onClick={() => history.back()}
type="button"