From fe9a3241b6ddad2cdc8f418bc14ae4f5af7fdbd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Paczy=C5=84ski?= Date: Thu, 14 Dec 2023 16:40:04 +0100 Subject: [PATCH] Hide assistant messages --- src/shared/hooks/assistant.ts | 10 +++++----- src/shared/hooks/realm.ts | 14 +++++++------- src/ui/Assistant/index.tsx | 12 ++++++------ 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/shared/hooks/assistant.ts b/src/shared/hooks/assistant.ts index 5ca3d141..0d3d292b 100644 --- a/src/shared/hooks/assistant.ts +++ b/src/shared/hooks/assistant.ts @@ -23,11 +23,11 @@ export function useAssistant(): { useEffect(() => { if (!assistantState) { - if (!isStakedInRealm) { - updateAssistantState({ visible: true, type: "welcome" }) - } else { - updateAssistantState({ visible: false, type: "default" }) - } + // if (!isStakedInRealm) { + // updateAssistantState({ visible: true, type: "welcome" }) + // } else { + updateAssistantState({ visible: false, type: "default" }) + // } } }, [assistantState, updateAssistantState, isStakedInRealm]) diff --git a/src/shared/hooks/realm.ts b/src/shared/hooks/realm.ts index 4080e7c6..13d11eb5 100644 --- a/src/shared/hooks/realm.ts +++ b/src/shared/hooks/realm.ts @@ -13,7 +13,7 @@ import { REALM_PANEL_ANIMATION_TIME, } from "shared/constants" import { useLocalStorageChange, useTabletScreen } from "./helpers" -import { useAssistant } from "./assistant" +// import { useAssistant } from "./assistant" export function useRealmPanelTransition(position: "left" | "right") { const realmPanelVisible = useDappSelector(selectRealmPanelVisible) @@ -103,7 +103,7 @@ export function usePanelRealmClose() { export function useOnRealmClick() { const realmId = useDappSelector(selectDisplayedRealmId) const dispatch = useDappDispatch() - const { updateAssistant, assistantVisible } = useAssistant() + // const { updateAssistant, assistantVisible } = useAssistant() const { value: visitedRealm, updateStorage: updateVisitedRealm } = useLocalStorageChange(LOCAL_STORAGE_VISITED_REALM) @@ -114,20 +114,20 @@ export function useOnRealmClick() { dispatch(setDisplayedRealmId(String(id))) dispatch(setRealmPanelVisible(true)) - if (assistantVisible("welcome")) - updateAssistant({ visible: false, type: "default" }) + // if (assistantVisible("welcome")) + // updateAssistant({ visible: false, type: "default" }) if (!visitedRealm) { updateVisitedRealm(true) - updateAssistant({ visible: true, type: "first-realm" }) + // updateAssistant({ visible: true, type: "first-realm" }) } } }, [ - assistantVisible, + // assistantVisible, dispatch, realmId, - updateAssistant, + // updateAssistant, updateVisitedRealm, visitedRealm, ] diff --git a/src/ui/Assistant/index.tsx b/src/ui/Assistant/index.tsx index ad44dae4..9617a5ad 100644 --- a/src/ui/Assistant/index.tsx +++ b/src/ui/Assistant/index.tsx @@ -3,10 +3,10 @@ import Icon from "shared/components/Media/Icon" import assistantImage from "shared/assets/assistant.png" import Portal from "shared/components/Interface/Portal" import { useAssistant } from "shared/hooks" -import AssistantWelcome from "./AssistantContent/AssistantWelcome" -import AssistantChallenges from "./AssistantContent/AssistantChallenges" +// import AssistantWelcome from "./AssistantContent/AssistantWelcome" +// import AssistantChallenges from "./AssistantContent/AssistantChallenges" import AssistantJoin from "./AssistantContent/AssistantJoin" -import AssistantFirstRealm from "./AssistantContent/AssistantFirstRealm" +// import AssistantFirstRealm from "./AssistantContent/AssistantFirstRealm" export default function Assistant() { const { assistant, updateAssistant } = useAssistant() @@ -32,10 +32,10 @@ export default function Assistant() { } /> - - + {/* */} + {/* */} - + {/* */}