File tree Expand file tree Collapse file tree 2 files changed +5
-8
lines changed Expand file tree Collapse file tree 2 files changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ const HomeView = ({}: Props) => {
7676 }
7777 console . log ( currentPath ) ;
7878
79- setHueDuration ( 12000 ) ;
79+ // setHueDuration(12000);
8080 } , [ currentPath ] ) ;
8181
8282 return (
Original file line number Diff line number Diff line change 1- import { User } from "firebase/auth" ;
21import StyleContext from "./StyleContext" ;
32import { ReactNode , useEffect , useState } from "react" ;
4- import { useSpring , config } from "react-spring" ;
3+ import { useSpring } from "react-spring" ;
54
65interface Props {
76 children : ReactNode ;
@@ -13,19 +12,17 @@ const StyleContextProvider = ({ children }: Props) => {
1312
1413 // ANIMATIONS / REACT SPRING
1514 const [ bgAnimOff , setBgAnimOff ] = useState < boolean > ( false ) ;
16- const [ hueDuration , setHueDuration ] = useState < number > ( 4500 ) ;
15+ const [ hueDuration , setHueDuration ] = useState < number > ( 4000 ) ;
1716 const hueRotation = useSpring ( {
18- loop : { reverse : true } ,
17+ loop : { reverse : true , config : { duration : hueDuration } } ,
1918 delay : 1000 ,
20- reset : true ,
2119 to : {
2220 filter : "hue-rotate(130deg) saturate(80%) sepia(30%)" ,
2321 } ,
2422 from : {
2523 filter : "hue-rotate(0deg) saturate(100%) sepia(0%)" ,
2624 } ,
27- cancel : bgAnimOff ,
28- config : { duration : hueDuration } ,
25+ config : { duration : hueDuration , precision : 0.001 } ,
2926 } ) ;
3027
3128 const checkWindowSize = ( ) => {
You can’t perform that action at this time.
0 commit comments