Skip to content

Commit cad1038

Browse files
committed
fix: some ui bug
1 parent d71a319 commit cad1038

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/components/widgets/shared/ArticleRightAside.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ const ArticleRightAsideImpl: Component = ({ children }) => {
4040

4141
// if scroll to top,
4242
// set isScrollToTop to true
43-
else if ($.scrollTop === 0) {
43+
else if ($.scrollTop < 20) {
4444
setIsScrollToTop(true)
4545
setIsScrollToBottom(false)
4646
} else {

src/components/widgets/shared/ToastCard.tsx

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
'use client'
22

3-
import { useId } from 'react'
43
import clsx from 'clsx'
54
import { m } from 'framer-motion'
65
import type { FC } from 'react'
@@ -26,13 +25,11 @@ export const ToastCard: FC<{
2625
onClick?: () => void
2726
}> = (props) => {
2827
const { iconElement, message, closeToast, onClick } = props
29-
const id = useId()
3028

3129
const MotionTag = onClick ? m.button : m.div
3230

3331
return (
3432
<MotionTag
35-
layoutId={id}
3633
layout="position"
3734
className={clsx(
3835
'relative w-full overflow-hidden rounded-xl shadow-md shadow-slate-200 dark:shadow-stone-800',
@@ -42,6 +39,7 @@ export const ToastCard: FC<{
4239
'space-x-4',
4340
'flex items-center',
4441
'select-none',
42+
'[&>i]:flex-shrink-0',
4543
)}
4644
onClick={onClick}
4745
>

0 commit comments

Comments
 (0)