diff --git a/pkg/interface/src/views/apps/launch/app.js b/pkg/interface/src/views/apps/launch/app.js index 4ea158cade..6943dcb0ee 100644 --- a/pkg/interface/src/views/apps/launch/app.js +++ b/pkg/interface/src/views/apps/launch/app.js @@ -49,7 +49,18 @@ export default function LaunchApp(props) { const baseHash = useLaunchState(state => state.baseHash); const [hashText, setHashText] = useState(baseHash); const [exitingTut, setExitingTut] = useState(false); + const seen = useSettingsState(s => s?.tutorial?.seen) ?? true; const associations = useMetadataState(s => s.associations); + const contacts = useContactState(state => state.contacts); + const hasLoaded = useMemo(() => Object.keys(contacts).length > 0, [contacts]); + const notificationsCount = useHarkState(state => state.notificationsCount); + const calmState = useSettingsState(selectCalmState); + const { hideUtilities } = calmState; + const { tutorialProgress, nextTutStep } = useLocalState(tutSelector); + let { hideGroups } = useLocalState(tutSelector); + !hideGroups ? { hideGroups } = calmState : null; + + const waiter = useWaitForProps({ ...props, associations }); const hashBox = ( Welcome - You have been invited to use Landscape, an interface to chat + You have been invited to use Landscape, an interface to chat and interact with communities
Would you like a tour of Landscape?
@@ -158,17 +161,12 @@ export default function LaunchApp(props) { )} }); - const contacts = useContactState(state => state.contacts); - const hasLoaded = useMemo(() => Object.keys(contacts).length > 0, [contacts]); - - const notificationsCount = useHarkState(state => state.notificationsCount); useEffect(() => { - const seenTutorial = _.get(props.settings, ['tutorial', 'seen'], true); - if(hasLoaded && !seenTutorial && tutorialProgress === 'hidden') { + if(hasLoaded && !seen && tutorialProgress === 'hidden') { showModal(); } - }, [props.settings, hasLoaded]); + }, [seen, hasLoaded]); return ( <>