logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe git clone https://hacktivis.me/git/mastofe.git

onboarding.js (403B)


  1. import { openModal } from './modal';
  2. import { changeSetting, saveSettings } from './settings';
  3. export function showOnboardingOnce() {
  4. return (dispatch, getState) => {
  5. const alreadySeen = getState().getIn(['settings', 'onboarded']);
  6. if (!alreadySeen) {
  7. dispatch(openModal('ONBOARDING'));
  8. dispatch(changeSetting(['onboarded'], true));
  9. dispatch(saveSettings());
  10. }
  11. };
  12. };