src/utils/skynet-ops.js
// Handle a user's logout action.
Handle a user's logout action.
Handle a user ' s logout action .
async function handleMySkyLogout(mySkyInstance, dispatch) {
    try {
        await mySkyInstance.logout();
        dispatch({type: SET_IS_LOGGED_IN, payload: false});
        dispatch({type: SET_MYSKY_USER_PROPOSALS_LIKED, payload: []});
        dispatch({type: SET_MYSKY_USER_PUBLIC_KEY, payload: ''});
    } catch (e) {
        console.error(`Error logging out from MySky: ${e.message}`);
    }
}
async function handleMySkyLogout ( mySkyInstance , dispatch ) { try { await mySkyInstance . logout ( ) ; dispatch ( { type : SET_IS_LOGGED_IN , payload : false } ) ; dispatch ( { type : SET_MYSKY_USER_PROPOSALS_LIKED , payload : [ ] } ) ; dispatch ( { type : SET_MYSKY_USER_PUBLIC_KEY , payload : '' } ) ; } catch ( e ) { console . error ( ` ${ e . message } ` ) ; } }
Handle a user's logout action.
Handle a user ' s logout action .