Skip to content

Commit 488b1bd

Browse files
committed
fix: add location on structured data of event
1 parent 07c3b85 commit 488b1bd

1 file changed

Lines changed: 14 additions & 11 deletions

File tree

pwa/utils/con/index.tsx

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,18 @@ export function localeDuration(
8484
return humanizeDuration(ms, params);
8585
}
8686

87+
const CONF_PLACE = {
88+
"@type": "Place",
89+
name: "Euratechnologies",
90+
address: {
91+
"@type": "PostalAddress",
92+
addressLocality: "Lille",
93+
addressRegion: "Hauts de France",
94+
postalCode: "59000",
95+
streetAddress: "Place de Saintignon, 165 avenue de Bretagne",
96+
},
97+
};
98+
8799
export function getEditionEventData(
88100
edition: string,
89101
speakers: Speaker[] = [],
@@ -109,17 +121,7 @@ export function getEditionEventData(
109121
url: "https://les-tilleuls.coop/en",
110122
},
111123
location: [
112-
{
113-
"@type": "Place",
114-
name: "Euratechnologies",
115-
address: {
116-
"@type": "PostalAddress",
117-
addressLocality: "Lille",
118-
addressRegion: "Hauts de France",
119-
postalCode: "59000",
120-
streetAddress: "Place de Saintignon, 165 avenue de Bretagne",
121-
},
122-
},
124+
CONF_PLACE,
123125
{
124126
"@type": "VirtualLocation",
125127
url: `https://api-platform.com/con/${edition}/`,
@@ -167,6 +169,7 @@ function getTalkSubEventData(conference: Conference, rootUrl: string) {
167169
...(date && end ? { endDate: `${date}T${end}:00` } : {}),
168170
eventStatus: "https://schema.org/EventScheduled",
169171
eventAttendanceMode: "https://schema.org/OfflineEventAttendanceMode",
172+
location: CONF_PLACE,
170173
...(talkUrl ? { url: talkUrl } : {}),
171174
...(conference.speakers?.length
172175
? {

0 commit comments

Comments
 (0)