|
|
@@ -17,9 +17,12 @@
|
|
|
<div v-if="newsItem">
|
|
|
<div class="news">
|
|
|
<CommonMeta
|
|
|
- :title="() => newsItem.title!"
|
|
|
- :description="() => newsItem.leadText!"
|
|
|
- :image="() => getImageUrl(newsItem.attachment)"
|
|
|
+ :title="newsItem.title!"
|
|
|
+ :description="newsItem.leadText!"
|
|
|
+ :image="
|
|
|
+ getImageUrl(newsItem.attachment) ??
|
|
|
+ 'public/images/logos/opentalent/Logo_Opentalent-gris.png'
|
|
|
+ "
|
|
|
/>
|
|
|
|
|
|
<v-row class="center-90 mb-12">
|
|
|
@@ -46,7 +49,7 @@
|
|
|
</v-row>
|
|
|
|
|
|
<v-row class="center-90">
|
|
|
- <p class="description" v-html="newsItem.bodyText" />
|
|
|
+ <p class="description" v-html="body" />
|
|
|
</v-row>
|
|
|
|
|
|
<v-row class="d-flex justify-center align-center">
|
|
|
@@ -110,6 +113,13 @@ if (!newsId || isNaN(newsId)) {
|
|
|
|
|
|
const newsItem = (await em.fetch(News, newsId, true)) as News
|
|
|
|
|
|
+const body: Ref<string | null> = ref(null)
|
|
|
+
|
|
|
+onMounted(() => {
|
|
|
+ // Seule solution trouvée pour le moment pour résoudre une erreur d'hydratation...
|
|
|
+ body.value = newsItem.bodyText
|
|
|
+})
|
|
|
+
|
|
|
const getImageUrl = (attachment: string | null): string | null => {
|
|
|
if (!attachment) {
|
|
|
return null
|