Skip to content

Commit

Permalink
feat: add active prop to useGlow
Browse files Browse the repository at this point in the history
  • Loading branch information
timoheddes committed Aug 14, 2023
1 parent c656bf5 commit 2de11c2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/libs/react-ui/src/components/NavHeader/useGlow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ interface IUseGlowReturn {
setActiveNav: React.Dispatch<React.SetStateAction<number>>;
}

const useGlow = (): IUseGlowReturn => {
const useGlow = (active = 0): IUseGlowReturn => {
const glowRef = useRef<HTMLDivElement>(null);
const navRef = useRef<HTMLDivElement>(null);

const [glowX, setGlowX] = useState(0);
const [activeNav, setActiveNav] = useState(0);
const [glowX, setGlowX] = useState(active);
const [activeNav, setActiveNav] = useState(active);

const prevGlowX = useRef<number>(glowX);
const glowAnimationSpeed = useRef<number>(0);
Expand Down

0 comments on commit 2de11c2

Please sign in to comment.