Missed this
This commit is contained in:
parent
9a9e16b35a
commit
5f052bb260
23
src/app.jsx
23
src/app.jsx
|
@ -146,15 +146,26 @@ function App() {
|
|||
return () => clearTimeout(timer);
|
||||
};
|
||||
useEffect(focusDeck, [location]);
|
||||
const showModal = useMemo(() => {
|
||||
return (
|
||||
snapStates.showCompose ||
|
||||
snapStates.showSettings ||
|
||||
snapStates.showAccount ||
|
||||
snapStates.showDrafts ||
|
||||
snapStates.showMediaModal
|
||||
);
|
||||
}, [
|
||||
snapStates.showCompose,
|
||||
snapStates.showSettings,
|
||||
snapStates.showAccount,
|
||||
snapStates.showDrafts,
|
||||
snapStates.showMediaModal,
|
||||
]);
|
||||
useEffect(() => {
|
||||
if (
|
||||
!snapStates.showCompose &&
|
||||
!snapStates.showSettings &&
|
||||
!snapStates.showAccount
|
||||
) {
|
||||
if (!showModal) {
|
||||
focusDeck();
|
||||
}
|
||||
}, [snapStates.showCompose, snapStates.showSettings, snapStates.showAccount]);
|
||||
}, [showModal]);
|
||||
|
||||
// useEffect(() => {
|
||||
// // HACK: prevent this from running again due to HMR
|
||||
|
|
Loading…
Reference in a new issue