mirror of
https://github.com/formbricks/formbricks.git
synced 2026-04-23 05:17:49 -05:00
24 lines
483 B
TypeScript
24 lines
483 B
TypeScript
"use client";
|
|
|
|
import { useRouter } from "next/navigation";
|
|
|
|
import { BackIcon } from "../icons";
|
|
|
|
export default function GoBackButton({ url }: { url?: string }) {
|
|
const router = useRouter();
|
|
return (
|
|
<button
|
|
className="inline-flex pt-5 text-sm text-slate-500"
|
|
onClick={() => {
|
|
if (url) {
|
|
router.push(url);
|
|
return;
|
|
}
|
|
router.back();
|
|
}}>
|
|
<BackIcon className="mr-2 h-5 w-5" />
|
|
Back
|
|
</button>
|
|
);
|
|
}
|