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
Some checks failed
platform/bro-js/challenge-pl/pipeline/head There was a failure building this commit
This commit is contained in:
@@ -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')
|
||||
}
|
||||
}, [])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user