Removed unnecessary types and fixed some bugs
This commit is contained in:
parent
441d8a42a3
commit
62e3869ce9
8 changed files with 16 additions and 46 deletions
src/components
|
@ -2,7 +2,7 @@
|
|||
export interface Props {
|
||||
slug: string
|
||||
title: string
|
||||
questReleaseDate: string
|
||||
questReleaseDate: Date
|
||||
shortdescription: string
|
||||
}
|
||||
|
||||
|
@ -11,9 +11,10 @@ const options_date: Intl.DateTimeFormatOptions = {
|
|||
month: 'long',
|
||||
day: '2-digit',
|
||||
}
|
||||
|
||||
const { shortdescription, questReleaseDate, slug, title } = Astro.props
|
||||
const url = `/database/${slug}`
|
||||
const render_date = new Date(questReleaseDate).toLocaleDateString(
|
||||
const render_date = questReleaseDate.toLocaleDateString(
|
||||
'en-GB',
|
||||
options_date
|
||||
)
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
---
|
||||
import type { ImageMetadata } from 'astro'
|
||||
import { Image } from 'astro:assets'
|
||||
import { plsLoadImage } from '../utils/tools'
|
||||
import type { GlobImage } from '../types/generic'
|
||||
export interface Props {
|
||||
title: string
|
||||
link: string
|
||||
date: string
|
||||
date: Date
|
||||
servant: string
|
||||
turns: string
|
||||
runner: string
|
||||
|
@ -26,7 +25,7 @@ const servant_images = import.meta.glob<GlobImage>(
|
|||
)
|
||||
const loaded_image = plsLoadImage(servant_images, servantImagePath)
|
||||
|
||||
const formatted_date = new Date(date).toLocaleDateString('de-DE', options_date)
|
||||
const formatted_date = date.toLocaleDateString('de-DE', options_date)
|
||||
const arialabel = `By ${runner} • ${formatted_date} ${turns}`
|
||||
---
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue