File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -165,13 +165,15 @@ const NavigationSection = ({
165165 dongleId,
166166 settings,
167167 changes,
168+ savedValues,
168169 getValue,
169170 setChanges,
170171} : {
171172 params : ParamValue [ ]
172173 dongleId : string
173174 settings : Setting [ ]
174175 changes : Record < string , string >
176+ savedValues : Record < string , string >
175177 getValue : ( s : Setting ) => string | null
176178 setChanges : React . Dispatch < React . SetStateAction < Record < string , string > > >
177179} ) => {
@@ -180,7 +182,7 @@ const NavigationSection = ({
180182 const [ newFavAddress , setNewFavAddress ] = useState ( '' )
181183
182184 const favoritesParam = params . find ( ( p ) => p . key === 'MapboxFavorites' )
183- const favoritesRaw = decode ( favoritesParam ?. value )
185+ const favoritesRaw = savedValues . MapboxFavorites ?? decode ( favoritesParam ?. value )
184186 const favorites : MapboxFavoritesData = useMemo ( ( ) => {
185187 if ( ! favoritesRaw ) return { }
186188 try {
@@ -582,6 +584,7 @@ export const Component = () => {
582584 dongleId = { dongleId }
583585 settings = { settingsByCategory . navigation }
584586 changes = { changes }
587+ savedValues = { savedValues }
585588 getValue = { getValue }
586589 setChanges = { setChanges }
587590 />
You can’t perform that action at this time.
0 commit comments