mirror of
https://github.com/zen-browser/www.git
synced 2025-07-08 01:10:02 +02:00
refactor(ModsList, ReleaseNoteListItem): update interface usage for better type safety
This commit is contained in:
parent
098e0eb9df
commit
1b7fafbb54
2 changed files with 5 additions and 3 deletions
|
@ -12,14 +12,14 @@ const defaultSortIcon = icon({ prefix: 'fas', iconName: 'sort' })
|
|||
const ascSortIcon = icon({ prefix: 'fas', iconName: 'sort-up' })
|
||||
const descSortIcon = icon({ prefix: 'fas', iconName: 'sort-down' })
|
||||
|
||||
interface ModsListProps {
|
||||
interface Props {
|
||||
allMods: ZenTheme[]
|
||||
locale: Locale
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
translations: any
|
||||
}
|
||||
|
||||
const { allMods, locale, translations } = Astro.props as ModsListProps
|
||||
const { allMods, locale, translations } = Astro.props
|
||||
|
||||
const getLocalePath = getPath(locale)
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
import { getLocale, getUI } from '~/utils/i18n'
|
||||
|
||||
const { type, content, link } = Astro.props as {
|
||||
interface Props {
|
||||
type: 'security' | 'feature' | 'fix' | 'theme' | 'break' | 'known'
|
||||
content: string
|
||||
link?: {
|
||||
|
@ -10,6 +10,8 @@ const { type, content, link } = Astro.props as {
|
|||
} | null
|
||||
}
|
||||
|
||||
const { type, content, link } = Astro.props as Props
|
||||
|
||||
const locale = getLocale(Astro)
|
||||
|
||||
const {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue