mirror of
https://github.com/remvze/moodist.git
synced 2025-12-17 08:54:13 +00:00
style: remove animation on change
This commit is contained in:
parent
48a85b2601
commit
41845ffe5e
1 changed files with 2 additions and 17 deletions
|
|
@ -1,8 +1,7 @@
|
||||||
import { useState, useEffect, useMemo, useCallback } from 'react';
|
import { useState, useEffect, useMemo, useCallback } from 'react';
|
||||||
import { motion, AnimatePresence } from 'framer-motion';
|
import { motion } from 'framer-motion';
|
||||||
|
|
||||||
import { padNumber } from '@/helpers/number';
|
import { padNumber } from '@/helpers/number';
|
||||||
import { fade } from '@/lib/motion';
|
|
||||||
|
|
||||||
import styles from './exercise.module.css';
|
import styles from './exercise.module.css';
|
||||||
|
|
||||||
|
|
@ -93,8 +92,6 @@ export function Exercise() {
|
||||||
return () => clearInterval(interval);
|
return () => clearInterval(interval);
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const variants = fade();
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className={styles.exercise}>
|
<div className={styles.exercise}>
|
||||||
|
|
@ -108,19 +105,7 @@ export function Exercise() {
|
||||||
key={selectedExercise}
|
key={selectedExercise}
|
||||||
variants={animationVariants}
|
variants={animationVariants}
|
||||||
/>
|
/>
|
||||||
|
<p className={styles.phase}>{PHASE_LABELS[currentPhase]}</p>
|
||||||
<AnimatePresence initial={false} mode="wait">
|
|
||||||
<motion.p
|
|
||||||
animate="show"
|
|
||||||
className={styles.phase}
|
|
||||||
exit="hidden"
|
|
||||||
initial="hidden"
|
|
||||||
key={PHASE_LABELS[currentPhase]}
|
|
||||||
variants={variants}
|
|
||||||
>
|
|
||||||
{PHASE_LABELS[currentPhase]}
|
|
||||||
</motion.p>
|
|
||||||
</AnimatePresence>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className={styles.selectWrapper}>
|
<div className={styles.selectWrapper}>
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue