Backbutton.tsx
This component is straightforward, utilizing the Button
component to generate a back button. It's particularly handy in Auth Rush for navigating between sign-in and sign-up pages, allowing users to switch between "Do you already have an account?" and "New here? Register" prompts.
import Link from "next/link";
import { Button } from "@/components/ui/button";
interface BackButtonProps {
href: string;
label?: string;
}
export const BackButton = ({ href, label }: BackButtonProps) => {
return (
<Button className="font-normal w-full" asChild size="sm" variant="link">
<Link href={href}>{label}</Link>
</Button>
);
};