TESTING
Thu Nov 30 2023 00:35:31 GMT+0000 (Coordinated Universal Time)
Saved by
@josiahbrown
"use client";
import { useRouter } from "next/navigation";
import { animatePageOut } from "@/animations";
export default function TransitionLink({
href,
label,
}: {
href: string;
label: string;
}) {
const router = useRouter();
const handleClick = () => {
animatePageOut(href, router);
};
return (
<button
className="border-[1px] border-black p-4 rounded-xl hover:bg-black hover:text-neutral-100 cursor-pointer"
onClick={handleClick}
>
{label}
</button>
);
}
content_copyCOPY
Comments