diff --git a/components/Menu/Carousel/CarouselBox.tsx b/components/Menu/Carousel/CarouselBox.tsx index 950acec..f126278 100644 --- a/components/Menu/Carousel/CarouselBox.tsx +++ b/components/Menu/Carousel/CarouselBox.tsx @@ -1,7 +1,13 @@ import Sign from "@/components/駅名表/Sign"; import React, { useEffect, useRef, useState } from "react"; import { AS } from "@/storageControl"; -import { useWindowDimensions, View, LayoutAnimation } from "react-native"; +import { + useWindowDimensions, + View, + LayoutAnimation, + TouchableOpacity, + Text, +} from "react-native"; import Carousel, { ICarouselInstance } from "react-native-reanimated-carousel"; import { SheetManager } from "react-native-actions-sheet"; import { StationNumber } from "../StationPagination"; @@ -13,6 +19,7 @@ export const CarouselBox = ({ setListIndex, listIndex, navigate, + stationListMode }) => { const carouselRef = useRef(null); const { height, width } = useWindowDimensions(); @@ -66,12 +73,36 @@ export const CarouselBox = ({ key={item[0].StationNumber} > - + {item[0].StationNumber != "null" ? ( + + ) : ( + + + + {stationListMode == "position" ? "現在地の近くに駅がありません。" : "お気に入りリストがありません。お気に入りの駅を追加しよう!"} + + + + )} ); @@ -80,7 +111,11 @@ export const CarouselBox = ({ 0 + ? listUpStation + : [[{ StationNumber: "null" }]] + } height={(((width / 100) * 80) / 20) * 9 + 10} pagingEnabled={true} snapEnabled={true} diff --git a/menu.js b/menu.js index ac2491e..73df951 100644 --- a/menu.js +++ b/menu.js @@ -312,7 +312,7 @@ export default function Menu(props) { /> )} - {listUpStation.length != 0 && originalStationList.length != 0 && ( + {originalStationList.length != 0 && ( <> {listUpStation[listIndex] && (