This repository was archived by the owner on Apr 19, 2024. It is now read-only.
File tree Expand file tree Collapse file tree
src/domains/dashboard/components/migration-manager Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,7 +14,6 @@ import { selectSignInUrl } from "domains/global/selectors"
1414import { useRequestRefreshOfAccessMessage } from "hooks/use-user-node-access"
1515import { selectIsCloudEnabled } from "domains/global/selectors"
1616import { selectRegistry } from "domains/global/selectors"
17- import { utmParametersToString } from "domains/global/selectors"
1817
1918// const PROMO_SIGN_UP_CLOUD: PromoProps = { userStatus: "UNKNOWN", nodeClaimedStatus: "NOT_CLAIMED" } //CLOUD
2019// const PROMO_SIGN_IN_CLOUD: PromoProps = {
@@ -78,7 +77,13 @@ const MigrationManager = () => {
7877
7978 const prefrenceID = migrationModalPromoInfo ?. tickBoxOption . prefrenceID || ""
8079
81- const [ hasPromoSelectionSaved , savePromoRemindMeSelection ] = useLocalStorage ( prefrenceID )
80+ /**
81+ * There is seem to be a bug when we are using the useLocalStorage,
82+ * the value to be returned does not change when prefrenceID is changing.
83+ * For that reason we acces the localStorage directly
84+ */
85+ const [ , savePromoRemindMeSelection ] = useLocalStorage ( prefrenceID )
86+ const hasPromoSelectionSaved = localStorage . getItem ( prefrenceID )
8287
8388 const closeModal = ( ) => {
8489 setModalOpen ( false )
You can’t perform that action at this time.
0 commit comments