Co-authored-by: tobi <tobi.smethurst@protonmail.com> Reviewed-on: https://codeberg.org/superseriousbusiness/masto-fe-standalone/pulls/88 Co-authored-by: Zoë Bijl <moiety@noreply.codeberg.org> Co-committed-by: Zoë Bijl <moiety@noreply.codeberg.org>
17 lines
432 B
JavaScript
17 lines
432 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({
|
|
modalType: "ONBOARDING",
|
|
}));
|
|
dispatch(changeSetting(["onboarded"], true));
|
|
dispatch(saveSettings());
|
|
}
|
|
};
|
|
}
|