diff --git a/Frontend/src/components/screens/WatchLists/AssetsList.jsx b/Frontend/src/components/screens/WatchLists/AssetsList.jsx index c5eb5352..10fe985d 100644 --- a/Frontend/src/components/screens/WatchLists/AssetsList.jsx +++ b/Frontend/src/components/screens/WatchLists/AssetsList.jsx @@ -97,7 +97,7 @@ const AssetsList = (props) => { /> ); - return ( + return props.watchListsArray.length > 0 && ( diff --git a/Frontend/src/components/screens/WatchLists/WatchListsScreen.jsx b/Frontend/src/components/screens/WatchLists/WatchListsScreen.jsx index 0511af94..a1188362 100644 --- a/Frontend/src/components/screens/WatchLists/WatchListsScreen.jsx +++ b/Frontend/src/components/screens/WatchLists/WatchListsScreen.jsx @@ -23,7 +23,6 @@ const WatchListsScreen = (props) => { { diff --git a/Frontend/src/routes/index.jsx b/Frontend/src/routes/index.jsx index 713a9f17..b6418626 100644 --- a/Frontend/src/routes/index.jsx +++ b/Frontend/src/routes/index.jsx @@ -18,7 +18,8 @@ const SettingsScreen = lazy(() => import('../components/screens/Settings/Setting */ const persistState = (keyName, defaultValue) => { const savedData = localStorage.getItem(keyName); - return savedData !== '' ? JSON.parse(savedData) : defaultValue; + console.log('savedData ==== ', savedData); + return !savedData ? JSON.parse(savedData) : defaultValue; }; /** @@ -29,7 +30,7 @@ const AppRoutes = () => { const [watchListsArray, setWatchListsArray] = useState(() => persistState('watchListsArray', [])); useEffect(() => { - localStorage.setItem("watchListsArray", JSON.stringify(watchListsArray)); + localStorage.setItem('watchListsArray', JSON.stringify(watchListsArray)); }, [watchListsArray]); return (