This commit is contained in:
Prospector
2025-07-05 11:37:41 -07:00
parent ece8a07486
commit 8faea1663a
2 changed files with 12 additions and 10 deletions

View File

@@ -195,14 +195,16 @@ async function setupApp() {
.then((res) => { .then((res) => {
if (res && res.articles) { if (res && res.articles) {
// Format expected by NewsArticleCard component. // Format expected by NewsArticleCard component.
news.value = res.articles.map((article) => ({ news.value = res.articles
...article, .map((article) => ({
path: article.link, ...article,
thumbnail: article.thumbnail, path: article.link,
title: article.title, thumbnail: article.thumbnail,
summary: article.summary, title: article.title,
date: article.date, summary: article.summary,
})).slice(0, 4) date: article.date,
}))
.slice(0, 4)
} }
}) })

View File

@@ -1,5 +1,5 @@
<script setup lang="ts"> <script setup lang="ts">
import type { Dayjs } from 'dayjs'; import type { Dayjs } from 'dayjs'
import dayjs from 'dayjs' import dayjs from 'dayjs'
import { import {
EyeIcon, EyeIcon,
@@ -42,7 +42,7 @@ const emit = defineEmits<{
}>() }>()
const props = defineProps<{ const props = defineProps<{
instance: GameInstance, instance: GameInstance
last_played: Dayjs last_played: Dayjs
}>() }>()