Implement local storage management for selected chain and task in MainPage component. Add state restoration logic on component mount and ensure cleanup on task completion. This enhances user experience by preserving selections across sessions.
Some checks failed
platform/bro-js/challenge-pl/pipeline/head There was a failure building this commit

This commit is contained in:
Primakov Alexandr Alexandrovich
2025-11-04 12:25:27 +03:00
parent 79e3dc9864
commit 25baea7447
2 changed files with 36 additions and 1 deletions

View File

@@ -177,6 +177,8 @@ export const ChallengeProvider = ({ children }: PropsWithChildren) => {
if (isBrowser()) {
window.localStorage.removeItem(USER_ID_KEY)
window.localStorage.removeItem(USER_NICKNAME_KEY)
window.localStorage.removeItem('challengeSelectedChainId')
window.localStorage.removeItem('challengeSelectedTaskId')
}
}, [])