refactor: 移除hero水墨动画,优化全局样式与组件细节
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
'use client';
|
||||
|
||||
import { useReducer } from 'react';
|
||||
import { useReducer, useEffect } from 'react';
|
||||
import { motion, AnimatePresence } from 'framer-motion';
|
||||
|
||||
interface FlipCardProps {
|
||||
@@ -93,7 +93,9 @@ function FlipCard({ value, label, maxDigits = 2 }: FlipCardProps) {
|
||||
},
|
||||
{ current: value, previous: value }
|
||||
);
|
||||
dispatch(value);
|
||||
useEffect(() => {
|
||||
dispatch(value);
|
||||
}, [value]);
|
||||
|
||||
const formatNumber = (num: number) => {
|
||||
const str = num.toString().padStart(maxDigits, '0');
|
||||
|
||||
Reference in New Issue
Block a user