最後の駅リスト選択を維持するように変更

This commit is contained in:
harukin-expo-dev-env
2025-05-06 16:27:42 +00:00
parent 7ca4cf95e6
commit 6a58263e94
2 changed files with 15 additions and 0 deletions

View File

@@ -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({