diff --git a/app/missions/[missionId]/page.tsx b/app/missions/[missionId]/page.tsx index 5d0f9721..29084211 100644 --- a/app/missions/[missionId]/page.tsx +++ b/app/missions/[missionId]/page.tsx @@ -2,7 +2,7 @@ import { useState, useEffect } from "react"; import { Button } from "@/components/ui/button"; -import { FileIcon, Calendar, Eye, MapPin, DollarSign, Clock, ThumbsUp, Languages, BarChart } from "lucide-react"; +import { FileIcon, Calendar, Eye, MapPin, Users, Clock, ThumbsUp, Languages, BarChart } from "lucide-react"; import { useToast } from "@/components/ui/use-toast"; import { useParams } from "next/navigation"; @@ -180,9 +180,34 @@ export default function MissionDetailPage() { - + + {/* Display logo instead of Participate button */} +
+ {mission.logoUrl ? ( + {mission.name} { + console.log("Logo failed to load:", mission.logoUrl); + // Show placeholder on error + (e.currentTarget as HTMLImageElement).style.display = 'none'; + const parent = e.currentTarget.parentElement; + if (parent) { + parent.classList.add('bg-gray-100'); + parent.classList.add('flex'); + parent.classList.add('items-center'); + parent.classList.add('justify-center'); + parent.innerHTML = `${mission.name.slice(0, 2).toUpperCase()}`; + } + }} + /> + ) : ( +
+ {mission.name.slice(0, 2).toUpperCase()} +
+ )} +
@@ -200,7 +225,7 @@ export default function MissionDetailPage() {
- +

Donneur d'ordre

@@ -244,12 +269,12 @@ export default function MissionDetailPage() { {oddInfo.label}
-

ODD

-

{oddInfo.label}

+

Objectif

+

Développement durable

)}