2017-04-16 18:32:00 +00: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 13:42:37 +00:00
|
|
|
dispatch(openModal({
|
|
|
|
modalType: 'ONBOARDING',
|
|
|
|
}));
|
2017-04-16 18:32:00 +00:00
|
|
|
dispatch(changeSetting(['onboarded'], true));
|
|
|
|
dispatch(saveSettings());
|
|
|
|
}
|
|
|
|
};
|
2023-02-03 19:52:07 +00:00
|
|
|
}
|