fix: 修复总览页常用书签加载时的动画抖动 — 移除嵌套 motion 组件的重复 y 偏移
This commit is contained in:
@@ -81,19 +81,18 @@ function DashboardPage() {
|
||||
{topBookmarks.map((bookmark: { id: string; name: string; url: string; icon: string | null }) => {
|
||||
const Icon = (bookmark.icon && allIcons[bookmark.icon]) || icons.Globe
|
||||
return (
|
||||
<motion.a
|
||||
<a
|
||||
key={bookmark.id}
|
||||
href={bookmark.url}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="group flex items-center gap-3 rounded-xl border bg-card px-3.5 py-3 transition-all duration-200 hover:-translate-y-0.5 hover:border-foreground/10 hover:shadow-md"
|
||||
variants={itemVariants}
|
||||
>
|
||||
<div className="flex size-8 shrink-0 items-center justify-center rounded-lg bg-muted/60 transition-colors group-hover:bg-muted">
|
||||
<Icon className="size-4 text-muted-foreground transition-colors group-hover:text-foreground" />
|
||||
</div>
|
||||
<span className="min-w-0 truncate text-sm font-medium">{bookmark.name}</span>
|
||||
</motion.a>
|
||||
</a>
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user