Skip to content

Commit

Permalink
Check for Button status when navigation happens
Browse files Browse the repository at this point in the history
  • Loading branch information
w9jds committed Aug 10, 2024
1 parent 520f81d commit d561cbd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/controls/TicketsButton.tsx
Original file line number Diff line number Diff line change
@@ -1,6 1,6 @@
import React, { useEffect, useRef, useState } from 'react';
import { motion, useAnimate } from 'framer-motion';
import { useNavigation } from 'react-router-dom';
import { useLocation, useNavigation } from 'react-router-dom';
import classnames from 'classnames';

import { EventbriteConfig } from 'config/delorean.config';
Expand All @@ -10,6 10,7 @@ import { LocalActivity } from '@mui/icons-material';
import './TicketsButton.scss';

const TicketButton = () => {
const location = useLocation();
const [scope, animate] = useAnimate();

const [isMobile, setMobile] = useState(false);
Expand All @@ -35,6 36,10 @@ const TicketButton = () => {
}
}, [])

useEffect(() => {
onTransitionEvent();
}, [location]);

useEffect(() => {
if (scope.current && isMobile && prev.current.isFooterVisible !== isFooterVisible) {
if (isFooterVisible) {
Expand Down

0 comments on commit d561cbd

Please sign in to comment.