mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-11-24 12:48:07 +01:00
15 lines
403 B
JavaScript
15 lines
403 B
JavaScript
|
import { openModal } from './modal';
|
||
|
import { changeSetting, saveSettings } from './settings';
|
||
|
|
||
|
export function showOnboardingOnce() {
|
||
|
return (dispatch, getState) => {
|
||
|
const alreadySeen = getState().getIn(['settings', 'onboarded']);
|
||
|
|
||
|
if (!alreadySeen) {
|
||
|
dispatch(openModal('ONBOARDING'));
|
||
|
dispatch(changeSetting(['onboarded'], true));
|
||
|
dispatch(saveSettings());
|
||
|
}
|
||
|
};
|
||
|
};
|