1
0
mirror of https://github.com/funamitech/mastodon synced 2024-12-27 13:08:25 +09:00
YuruToot/app/assets/javascripts/components/actions/onboarding.jsx

15 lines
403 B
React
Raw Normal View History

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());
}
};
};