The current implementation of clearLocalStorage explicitly clears the entire LocalStorage and then re-sets specific keys like themeId and domain. Replace the hardcoded clearLocalStorage logic with a generalized utility that preserves specified keys. This makes the function reusable and easier to maintain across use cases
The current implementation of clearLocalStorage explicitly clears the entire LocalStorage and then re-sets specific keys like themeId and domain. Replace the hardcoded clearLocalStorage logic with a generalized utility that preserves specified keys. This makes the function reusable and easier to maintain across use cases