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