引入 husky,并全局重新格式化

This commit is contained in:
2025-06-07 11:49:57 +08:00
parent 05fce179c9
commit c7527177b0
89 changed files with 2140 additions and 1899 deletions

View File

@@ -36,26 +36,26 @@ async function UserCenter() {
>
{profile.id_token
? (
<>
<div className="flex gap-2 items-center">
<CheckCircleIcon size={20} className="text-done"/>
<span></span>
</div>
<div className="flex flex-col items-end">
<span className="text-sm">{profile.name}</span>
<span className="text-xs text-weak">{profile.id_no}</span>
</div>
</>
)
<>
<div className="flex gap-2 items-center">
<CheckCircleIcon size={20} className="text-done"/>
<span></span>
</div>
<div className="flex flex-col items-end">
<span className="text-sm">{profile.name}</span>
<span className="text-xs text-weak">{profile.id_no}</span>
</div>
</>
)
: (
<>
<span className="flex gap-2 items-center">
<CircleAlertIcon className="text-warn"/>
<span></span>
</span>
<Button className="h-9"></Button>
</>
)}
<>
<span className="flex gap-2 items-center">
<CircleAlertIcon className="text-warn"/>
<span></span>
</span>
<Button className="h-9"></Button>
</>
)}
</div>
<div className="flex flex-col gap-1">
<h4 className="text-sm text-weak"></h4>

View File

@@ -168,24 +168,24 @@ function Announcements(props: Props) {
<CardContent className="flex-auto p-0">
{!props.list.length
? (
<div className="flex flex-col items-center justify-center gap-2 h-full">
<Image alt="coming soon" src={soon}/>
<p></p>
</div>
)
<div className="flex flex-col items-center justify-center gap-2 h-full">
<Image alt="coming soon" src={soon}/>
<p></p>
</div>
)
: props.list.map(item => (
<div
key={item.id}
className={merge(
`transition-colors duration-150 ease-in-out`,
`flex flex-col gap-1 px-4 py-2`,
`hover:bg-muted cursor-pointer`,
)}
>
<h4>{item.title}</h4>
<p className="text-sm text-weak">{format(item.created_at, 'yyyy-MM-dd HH:mm')}</p>
</div>
))}
<div
key={item.id}
className={merge(
`transition-colors duration-150 ease-in-out`,
`flex flex-col gap-1 px-4 py-2`,
`hover:bg-muted cursor-pointer`,
)}
>
<h4>{item.title}</h4>
<p className="text-sm text-weak">{format(item.created_at, 'yyyy-MM-dd HH:mm')}</p>
</div>
))}
</CardContent>
</Card>
)