diff --git a/src/app/annuaire/AnnuaireClient.tsx b/src/app/annuaire/AnnuaireClient.tsx index 6a28c9b..edc14c0 100644 --- a/src/app/annuaire/AnnuaireClient.tsx +++ b/src/app/annuaire/AnnuaireClient.tsx @@ -9,6 +9,8 @@ export type DirectoryMember = { description: string | null; city: string | null; address: string | null; + coverUrl: string | null; + logoUrl: string | null; categoryLabel: string | null; accent: string | null; hasPromo: boolean; @@ -187,7 +189,9 @@ export function AnnuaireClient({ {/* grid / empty */} {list.length > 0 ? (
- {list.map((m, i) => ( + {list.map((m, i) => { + const image = m.coverUrl || m.logoUrl; + return ( - - photo vitrine - + {!image && ( + + photo vitrine + + )} {m.categoryLabel && ( {m.categoryLabel} @@ -231,7 +239,8 @@ export function AnnuaireClient({
- ))} + ); + })} ) : (
diff --git a/src/lib/queries.ts b/src/lib/queries.ts index cacc722..9dcc7f4 100644 --- a/src/lib/queries.ts +++ b/src/lib/queries.ts @@ -10,6 +10,8 @@ export async function getActiveMembersWithCategory() { description: members.description, city: members.city, address: members.address, + coverUrl: members.coverUrl, + logoUrl: members.logoUrl, categoryLabel: categories.label, accent: categories.accent, })