turkmen-expo/components/shared/event-page-buttons.tsx

48 lines
1.2 KiB
TypeScript
Raw Normal View History

2025-10-12 17:42:17 +00:00
"use client";
import { useTranslations } from "next-intl";
import { Link } from "@/i18n/navigation";
2025-10-12 17:42:17 +00:00
import { FC } from "react";
interface Props {
className?: string;
once?: boolean;
register?: string;
visit?: string;
details?: string;
}
export const EventPageButtons: FC<Props> = ({
once = false,
register,
visit,
details,
}) => {
const t = useTranslations("events");
2025-10-12 17:42:17 +00:00
return (
<div className="flex items-center gap-6">
{once ? (
<>
<Link href={register || ""} className="w-full" target="_blank">
<button className="full-btn bg-PRIMARY py-2.5 text-white">
{t("registration")}
2025-10-12 17:42:17 +00:00
</button>
</Link>
<Link href={visit || ""} className="w-full" target="_blank">
<button className="full-btn bg-SECONDARY_CONTAINER py-2.5 text-ON_SECONDARY_CONTAINER">
{t("visitSite")}
2025-10-12 17:42:17 +00:00
</button>
</Link>
</>
) : (
<Link href={details || ""} className="w-full" target="_blank">
<button className="full-btn w-full bg-PRIMARY py-2.5 text-white">
{t("more")}
2025-10-12 17:42:17 +00:00
</button>
</Link>
)}
</div>
);
};