mirror of
https://github.com/saicaca/fuwari.git
synced 2026-01-11 23:02:53 +01:00
refactor: remove unused props from components and improve error handling in about page (#385)
This commit is contained in:
committed by
GitHub
parent
c8142d0ac5
commit
7ea2f7f40f
@@ -10,7 +10,7 @@ interface Props {
|
||||
tags?: string[]
|
||||
categories?: string[]
|
||||
}
|
||||
const { keyword, tags, categories } = Astro.props
|
||||
const { tags, categories } = Astro.props
|
||||
|
||||
let posts = await getSortedPosts()
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ interface Props {
|
||||
href?: string
|
||||
label?: string
|
||||
}
|
||||
const { size, dot, href, label }: Props = Astro.props
|
||||
const { dot, href, label }: Props = Astro.props
|
||||
---
|
||||
<a href={href} aria-label={label} class="btn-regular h-8 text-sm px-3 rounded-lg">
|
||||
{dot && <div class="h-1 w-1 bg-[var(--btn-content)] dark:bg-[var(--card-bg)] transition rounded-md mr-2"></div>}
|
||||
|
||||
@@ -12,7 +12,7 @@ interface Props {
|
||||
class: string
|
||||
}
|
||||
|
||||
const { title, slug, pubDate } = Astro.props
|
||||
const { title, pubDate } = Astro.props
|
||||
const className = Astro.props.class
|
||||
const profileConf = profileConfig
|
||||
const licenseConf = licenseConfig
|
||||
|
||||
@@ -3,7 +3,6 @@ import Profile from './Profile.astro'
|
||||
import Tag from './Tags.astro'
|
||||
import Categories from './Categories.astro'
|
||||
import type { MarkdownHeading } from 'astro'
|
||||
import TOC from './TOC.astro'
|
||||
|
||||
interface Props {
|
||||
class? : string
|
||||
@@ -11,7 +10,6 @@ interface Props {
|
||||
}
|
||||
|
||||
const className = Astro.props.class
|
||||
const headings = Astro.props.headings
|
||||
|
||||
---
|
||||
<div id="sidebar" class:list={[className, "w-full"]}>
|
||||
|
||||
@@ -10,7 +10,6 @@ interface Props {
|
||||
class?: string
|
||||
style?: string
|
||||
}
|
||||
const props = Astro.props
|
||||
const { id, name, isCollapsed, collapsedHeight, style } = Astro.props
|
||||
const className = Astro.props.class
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user