Merge commit '58340bb608aca83f50ea018fcbdd4f7e4043952c' into develop

This commit is contained in:
harukin-DeskMini 2023-02-01 20:46:14 +09:00
commit ece076ad48

View File

@ -74,6 +74,7 @@ export default function Menu(props) {
useEffect(() => {
getStationList().then(setOriginalStationList);
}, []);
const [locationAndFavorite, setLocationAndFavorite] = useState([]);
useEffect(() => {
if (!favoriteStation) return () => {};
@ -83,6 +84,13 @@ export default function Menu(props) {
setLocationAndFavorite(data);
}, [currentStation, favoriteStation]);
useEffect(() => {
if (!(selectedCurrentStation < favoriteStation.length)) {
setSelectedCurrentStation(favoriteStation.length - 1);
carouselRef.current.snapToItem(favoriteStation.length - 1);
}
}, [favoriteStation]);
const [stationName, setStationName] = useState(undefined);
const [currentStation, setCurrentStation] = useState(undefined);
useEffect(() => {