Files
Frontend/src/app/components/rediect-button.tsx

19 lines
455 B
TypeScript
Raw Normal View History

import Link from "next/link";
2024-04-18 03:51:41 +01:00
import { ReactElement } from "react";
type ButtonProps = {
title: string;
url: string;
2024-04-16 21:18:08 +01:00
openInNewTab?: boolean;
};
2024-04-18 03:51:41 +01:00
export function RedirectButton({ title, url, openInNewTab }: ButtonProps): ReactElement {
return (
<div className="w-fit rounded-lg">
2024-04-16 21:18:08 +01:00
<Link href={url} target={openInNewTab ? "_blank" : ""}>
<p className="hover:text-primary transition-all">{title}</p>
</Link>
</div>
);
}