fix: restrict RAISE Incubator portal link to RAISE entity and render official website link for other centers

This commit is contained in:
Amudieshwar
2026-08-19 08:37:48 +05:30
parent 5f3b3f5973
commit 7cd28fa974

View File

@@ -927,13 +927,19 @@ export default function Events() {
</div>
{/* Social & Community Links */}
{Boolean(
{(() => {
const isRaiseIncubator = selectedClub.id === 'center_raise' || selectedClub.socialLinks?.website === '/raise';
const hasSocials = Boolean(
selectedClub.socialLinks?.instagram ||
selectedClub.socialLinks?.linkedin ||
selectedClub.socialLinks?.whatsapp ||
selectedClub.socialLinks?.youtube ||
selectedClub.socialLinks?.website
) && (
);
if (!hasSocials) return null;
return (
<div className="mb-6 bg-orange-50/60 border border-orange-200/80 rounded-2xl p-4">
<div className="flex items-center justify-between mb-3">
<div className="flex items-center gap-2 text-xs font-bold text-[#F97316] uppercase tracking-wider">
@@ -944,7 +950,7 @@ export default function Events() {
</div>
<div className="grid grid-cols-2 gap-2.5">
{selectedClub.socialLinks?.website && (
{isRaiseIncubator && selectedClub.socialLinks?.website && (
<Link
to={selectedClub.socialLinks.website}
onClick={() => setSelectedClub(null)}
@@ -955,6 +961,18 @@ export default function Events() {
</Link>
)}
{!isRaiseIncubator && selectedClub.socialLinks?.website && selectedClub.socialLinks.website.startsWith('http') && (
<a
href={selectedClub.socialLinks.website}
target="_blank"
rel="noopener noreferrer"
className="flex items-center gap-2 p-2.5 rounded-xl bg-white border border-slate-200 hover:border-orange-500 hover:text-orange-600 transition-all text-xs font-medium text-slate-700"
>
<Globe className="w-4 h-4 text-orange-500 shrink-0" />
<span className="truncate">Official Website</span>
</a>
)}
{selectedClub.socialLinks?.instagram && (
<a
href={selectedClub.socialLinks.instagram}
@@ -1004,7 +1022,8 @@ export default function Events() {
)}
</div>
</div>
)}
);
})()}
{/* Close Button */}
<div>