(null);
// this maxi useEffect is called only once: when the component is mounted.
// For the action panel, it means this is called only one per app start/with a user loggedin
useEffect(() => {
void doAppStartUp(dispatch);
}, []);
// wait for cleanUpMediasInterval and then start cleaning up medias
// this would be way easier to just be able to not trigger a call with the setInterval
useEffect(() => {
const timeout = global.setTimeout(() => setStartCleanUpMedia(true), cleanUpMediasInterval);
return () => global.clearTimeout(timeout);
}, []);
useInterval(
() => {
cleanUpOldDecryptedMedias();
},
startCleanUpMedia ? cleanUpMediasInterval : null
);
if (!ourPrimaryConversation) {
window.log.warn('ActionsPanel: ourPrimaryConversation is not set');
return <>>;
}
useInterval(() => {
void syncConfigurationIfNeeded();
}, DAYS * 2);
useInterval(() => {
void forceRefreshRandomSnodePool();
}, DAYS * 1);
const formatLog = (s: any ) => {
console.log("@@@@:: ", s);
}
// const confirmModalState = useSelector((state: StateType) => state);
const confirmModalState = useSelector((state: StateType) => state.confirmModal);
console.log('@@@ confirm modal state', confirmModalState);
// formatLog(confirmModalState.modalState.title);
formatLog(confirmModalState);
// formatLog(confirmModalState2);
return (
<>
{modal ? modal : null}
{/* { confirmModalState && confirmModalState.title ? {confirmModalState.title}
: null} */}
{ confirmModalState ? : null}
>
);
};