fixes for site

This commit is contained in:
Desktop
2025-11-13 18:42:53 +05:00
parent 86f6886a13
commit a9e8d6fe2d
4 changed files with 59 additions and 37 deletions

View File

@@ -16,6 +16,29 @@ const HeroSection: React.FC<HeroSectionProps> = ({
primaryCta,
secondaryCta,
}) => {
const renderCta = (cta: { label: string; href: string }, className: string) => {
const isExternal = cta.href.startsWith("http");
if (isExternal) {
return (
<a
href={cta.href}
className={className}
target="_blank"
rel="noreferrer"
>
{cta.label}
</a>
);
}
return (
<Link to={cta.href} className={className}>
{cta.label}
</Link>
);
};
return (
<section className="relative overflow-hidden">
<div className="absolute inset-0 bg-[radial-gradient(circle_at_top,_rgba(66,133,244,0.25),_rgba(9,14,26,0.9))]" />
@@ -31,19 +54,13 @@ const HeroSection: React.FC<HeroSectionProps> = ({
{subheadline}
</p>
<div className="flex flex-col sm:flex-row gap-4">
<Link
to={primaryCta.href}
className="inline-flex items-center justify-center rounded-full bg-brand-500 hover:bg-brand-400 px-6 py-3 text-sm md:text-base font-semibold transition"
>
{primaryCta.label}
</Link>
{secondaryCta && (
<Link
to={secondaryCta.href}
className="inline-flex items-center justify-center rounded-full border border-white/20 px-6 py-3 text-sm md:text-base font-semibold text-white/80 hover:text-white hover:border-white/40 transition"
>
{secondaryCta.label}
</Link>
{renderCta(
primaryCta,
"inline-flex items-center justify-center rounded-full bg-brand-500 hover:bg-brand-400 px-6 py-3 text-sm md:text-base font-semibold transition"
)}
{secondaryCta && renderCta(
secondaryCta,
"inline-flex items-center justify-center rounded-full border border-white/20 px-6 py-3 text-sm md:text-base font-semibold text-white/80 hover:text-white hover:border-white/40 transition"
)}
</div>
</div>