update
This commit is contained in:
@@ -36,16 +36,17 @@ export const CookieConsentBanner: React.FC = () => {
|
||||
const [isVisible, setIsVisible] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
if (state.showBanner) {
|
||||
if (state.showBanner && !state.showSettings) {
|
||||
// Small delay to ensure smooth animation
|
||||
const timer = setTimeout(() => setIsVisible(true), 100);
|
||||
return () => clearTimeout(timer);
|
||||
} else {
|
||||
setIsVisible(false);
|
||||
}
|
||||
}, [state.showBanner]);
|
||||
}, [state.showBanner, state.showSettings]);
|
||||
|
||||
if (!state.showBanner || !isVisible) return null;
|
||||
// Hide banner when settings modal is open
|
||||
if (!state.showBanner || !isVisible || state.showSettings) return null;
|
||||
|
||||
return (
|
||||
<AnimatePresence>
|
||||
@@ -205,6 +206,9 @@ export const CookieSettingsModal: React.FC = () => {
|
||||
transition={{ duration: 0.2 }}
|
||||
className="cookie-settings-overlay"
|
||||
onClick={hideSettings}
|
||||
style={{
|
||||
zIndex: 10001, // Higher than banner overlay (10000)
|
||||
}}
|
||||
>
|
||||
<motion.div
|
||||
initial={{ scale: 0.9, opacity: 0 }}
|
||||
|
||||
Reference in New Issue
Block a user