fix: restrict RAISE Incubator portal link to RAISE entity and render official website link for other centers
This commit is contained in:
@@ -927,13 +927,19 @@ export default function Events() {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Social & Community Links */}
|
{/* Social & Community Links */}
|
||||||
{Boolean(
|
{(() => {
|
||||||
|
const isRaiseIncubator = selectedClub.id === 'center_raise' || selectedClub.socialLinks?.website === '/raise';
|
||||||
|
const hasSocials = Boolean(
|
||||||
selectedClub.socialLinks?.instagram ||
|
selectedClub.socialLinks?.instagram ||
|
||||||
selectedClub.socialLinks?.linkedin ||
|
selectedClub.socialLinks?.linkedin ||
|
||||||
selectedClub.socialLinks?.whatsapp ||
|
selectedClub.socialLinks?.whatsapp ||
|
||||||
selectedClub.socialLinks?.youtube ||
|
selectedClub.socialLinks?.youtube ||
|
||||||
selectedClub.socialLinks?.website
|
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="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 justify-between mb-3">
|
||||||
<div className="flex items-center gap-2 text-xs font-bold text-[#F97316] uppercase tracking-wider">
|
<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>
|
||||||
|
|
||||||
<div className="grid grid-cols-2 gap-2.5">
|
<div className="grid grid-cols-2 gap-2.5">
|
||||||
{selectedClub.socialLinks?.website && (
|
{isRaiseIncubator && selectedClub.socialLinks?.website && (
|
||||||
<Link
|
<Link
|
||||||
to={selectedClub.socialLinks.website}
|
to={selectedClub.socialLinks.website}
|
||||||
onClick={() => setSelectedClub(null)}
|
onClick={() => setSelectedClub(null)}
|
||||||
@@ -955,6 +961,18 @@ export default function Events() {
|
|||||||
</Link>
|
</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 && (
|
{selectedClub.socialLinks?.instagram && (
|
||||||
<a
|
<a
|
||||||
href={selectedClub.socialLinks.instagram}
|
href={selectedClub.socialLinks.instagram}
|
||||||
@@ -1004,7 +1022,8 @@ export default function Events() {
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
);
|
||||||
|
})()}
|
||||||
|
|
||||||
{/* Close Button */}
|
{/* Close Button */}
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
Reference in New Issue
Block a user