2017-04-16 14:32:00 -04:00
|
|
|
import { openModal } from './modal';
|
|
|
|
import { changeSetting, saveSettings } from './settings';
|
|
|
|
|
|
|
|
export function showOnboardingOnce() {
|
|
|
|
return (dispatch, getState) => {
|
|
|
|
const alreadySeen = getState().getIn(['settings', 'onboarded']);
|
|
|
|
|
|
|
|
if (!alreadySeen) {
|
2023-05-25 09:42:37 -04:00
|
|
|
dispatch(openModal({
|
|
|
|
modalType: 'ONBOARDING',
|
|
|
|
}));
|
2017-04-16 14:32:00 -04:00
|
|
|
dispatch(changeSetting(['onboarded'], true));
|
|
|
|
dispatch(saveSettings());
|
|
|
|
}
|
|
|
|
};
|
2023-02-03 14:52:07 -05:00
|
|
|
}
|