this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Slight rewrite, possibly breaking

+8 -4
+8 -4
src/app.jsx
··· 267 267 ); 268 268 } 269 269 270 + function getPrevLocation() { 271 + return states.prevLocation || null; 272 + } 270 273 function SecondaryRoutes({ isLoggedIn }) { 271 - const snapStates = useSnapshot(states); 274 + // const snapStates = useSnapshot(states); 272 275 const location = useLocation(); 273 - const prevLocation = snapStates.prevLocation; 274 - const backgroundLocation = useRef(prevLocation || null); 276 + // const prevLocation = snapStates.prevLocation; 277 + const backgroundLocation = useRef(getPrevLocation()); 275 278 276 279 const isModalPage = useMemo(() => { 277 280 return ( ··· 280 283 ); 281 284 }, [location.pathname, matchPath]); 282 285 if (isModalPage) { 283 - if (!backgroundLocation.current) backgroundLocation.current = prevLocation; 286 + if (!backgroundLocation.current) 287 + backgroundLocation.current = getPrevLocation(); 284 288 } else { 285 289 backgroundLocation.current = null; 286 290 }