引入 husky,并全局重新格式化
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user