最後の駅リスト選択を維持するように変更
This commit is contained in:
8
menu.js
8
menu.js
@@ -29,6 +29,7 @@ import { useBottomTabBarHeight } from "@react-navigation/bottom-tabs";
|
||||
import { CarouselBox } from "./components/Menu/Carousel/CarouselBox";
|
||||
import { CarouselTypeChanger } from "./components/Menu/Carousel/CarouselTypeChanger";
|
||||
import { useUserPosition } from "./stateBox/useUserPosition";
|
||||
import { AS } from "./storageControl";
|
||||
configureReanimatedLogger({
|
||||
level: ReanimatedLogLevel.error, // Set the log level to error
|
||||
strict: true, // Reanimated runs in strict mode by default
|
||||
@@ -49,6 +50,13 @@ export default function Menu({
|
||||
const [stationListMode, setStationListMode] = useState(
|
||||
/*<"position"|"favorite">*/ "position"
|
||||
);
|
||||
useEffect(()=>{
|
||||
AS.getItem("stationListMode").then((res) => {
|
||||
setStationListMode(res);
|
||||
}).catch((e) => {
|
||||
// AS.setItem("stationListMode", "position");
|
||||
});
|
||||
}, []);
|
||||
const mapsRef = useRef(null);
|
||||
const returnToTop = (bool = true) => {
|
||||
scrollRef.current.scrollTo({
|
||||
|
Reference in New Issue
Block a user