missions ui
This commit is contained in:
parent
b0e9f1d816
commit
bebb2196d6
@ -59,6 +59,7 @@ export async function GET(request: Request) {
|
|||||||
projection: true,
|
projection: true,
|
||||||
participation: true,
|
participation: true,
|
||||||
services: true,
|
services: true,
|
||||||
|
intention: true,
|
||||||
createdAt: true,
|
createdAt: true,
|
||||||
creator: {
|
creator: {
|
||||||
select: {
|
select: {
|
||||||
|
|||||||
@ -52,8 +52,8 @@ export default function MissionsPage() {
|
|||||||
throw new Error('Failed to fetch missions');
|
throw new Error('Failed to fetch missions');
|
||||||
}
|
}
|
||||||
const data = await response.json();
|
const data = await response.json();
|
||||||
// Debug log to check mission data structure
|
// Debug log to check mission data structure including intention
|
||||||
console.log("Mission data:", data.missions);
|
console.log("Mission data with intention:", data.missions);
|
||||||
setMissions(data.missions || []);
|
setMissions(data.missions || []);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error fetching missions:', error);
|
console.error('Error fetching missions:', error);
|
||||||
@ -273,7 +273,9 @@ export default function MissionsPage() {
|
|||||||
|
|
||||||
{/* Description text (can be added from mission data) */}
|
{/* Description text (can be added from mission data) */}
|
||||||
<div className="mt-2 text-sm text-gray-600 line-clamp-2">
|
<div className="mt-2 text-sm text-gray-600 line-clamp-2">
|
||||||
{mission.intention ? mission.intention.substring(0, 100) + (mission.intention.length > 100 ? '...' : '') : 'Pas de description disponible.'}
|
{mission.intention ?
|
||||||
|
(mission.intention.substring(0, 100) + (mission.intention.length > 100 ? '...' : '')) :
|
||||||
|
'Pas de description disponible.'}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user