Skip to content

Commit 20b2d11

Browse files
committed
fix: transition view
Signed-off-by: Innei <[email protected]>
1 parent fede3f6 commit 20b2d11

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

src/app/(app)/(home)/page.tsx

+1-3
Original file line numberDiff line numberDiff line change
@@ -183,9 +183,7 @@ const Hero = () => {
183183
</ul>
184184
</>
185185

186-
<div
187-
className={clsx('lg:size-[300px]', 'size-[200px]')}
188-
>
186+
<div className={clsx('lg:size-[300px]', 'size-[200px]')}>
189187
<Image
190188
height={300}
191189
width={300}

src/components/ui/transition/factor.tsx

+9-4
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,17 @@ export const createTransitionView = (params: TransitionViewParams) => {
5454

5555
const motionProps: MotionProps = {
5656
initial: initial || from,
57-
animate: to,
57+
animate: {
58+
...to,
59+
transition: {
60+
duration,
61+
...(preset || microReboundPreset),
62+
...animation.enter,
63+
delay: enter / 1000,
64+
},
65+
},
5866
transition: {
5967
duration,
60-
...(preset || microReboundPreset),
61-
...animation.enter,
62-
delay: enter / 1000,
6368
},
6469
exit: {
6570
...from,

0 commit comments

Comments
 (0)