import { resizeImage } from '@/web/utils/common' import { cx, css } from '@emotion/css' import useIsMobile from '@/web/hooks/useIsMobile' import { useSnapshot } from 'valtio' import uiStates from '@/web/states/uiStates' import { AnimatePresence, motion, useAnimation } from 'framer-motion' import { ease } from '@/web/utils/const' import { useLocation } from 'react-router-dom' import { useEffect } from 'react' const BlurBackground = () => { const isMobile = useIsMobile() const { hideTopbarBackground, blurBackgroundImage } = useSnapshot(uiStates) const location = useLocation() const animate = useAnimation() useEffect(() => { uiStates.blurBackgroundImage = null }, [location.pathname]) const onLoad = async () => { animate.start({ opacity: 1 }) } return ( {!isMobile && blurBackgroundImage && hideTopbarBackground && ( )} ) } export default BlurBackground