不要な内容の整理とコードの並び替え

This commit is contained in:
harukin-expo-dev-env
2025-09-24 07:11:34 +00:00
parent 7ae6bc8801
commit f7e59cd75b
3 changed files with 42 additions and 41 deletions

View File

@@ -15,6 +15,7 @@ import { useAllTrainDiagram } from "@/stateBox/useAllTrainDiagram";
import { useAreaInfo } from "@/stateBox/useAreaInfo";
import { useCurrentTrain } from "@/stateBox/useCurrentTrain";
import { useStationList } from "@/stateBox/useStationList";
import { useTrainMenu } from "@/stateBox/useTrainMenu";
import { Ionicons } from "@expo/vector-icons";
import { useNavigation } from "@react-navigation/native";
@@ -33,6 +34,7 @@ export const FixedStation: FC<props> = ({
displaySize,
setDisplaySize,
}) => {
const { mapSwitch } = useTrainMenu();
const { currentTrain, setFixedPosition } = useCurrentTrain();
const { getStationDataFromId } = useStationList();
const { navigate } = useNavigation();
@@ -48,7 +50,7 @@ export const FixedStation: FC<props> = ({
////
const { allTrainDiagram } = useAllTrainDiagram();
const { areaInfo, areaStationID } = useAreaInfo();
const { areaStationID } = useAreaInfo();
const [stationDiagram, setStationDiagram] = useState({}); //当該駅の全時刻表
const [isInfoArea, setIsInfoArea] = useState(false);
@@ -283,10 +285,10 @@ export const FixedStation: FC<props> = ({
duration: 500,
update: { type: "spring", springDamping: 0.7 },
});
if (displaySize === 76) {
setDisplaySize(226);
if (displaySize === 226) {
setDisplaySize(mapSwitch == "true" ? 76 : 80);
} else {
setDisplaySize(76);
setDisplaySize(226);
}
}}
>
@@ -316,7 +318,7 @@ export const FixedStation: FC<props> = ({
pointerEvents="none"
>
<Ionicons
name={displaySize == 76 ? "chevron-down" : "chevron-up"}
name={displaySize == 226 ? "chevron-up" : "chevron-down"}
size={15}
color="white"
/>
@@ -328,7 +330,7 @@ export const FixedStation: FC<props> = ({
fontSize: 15,
}}
>
{displaySize == 76 ? "時刻表を展開する" : "時刻表を縮小する"}
{displaySize == 226 ? "時刻表を縮小する" : "時刻表を展開する"}
</Text>
</View>
</TouchableOpacity>
@@ -362,7 +364,7 @@ const FixedStationBoxEachTrain = ({ d, station, displaySize }) => {
style={{
backgroundColor: "white",
flexDirection: "row",
height: displaySize == 76 ? "33%" : "7.5%",
height: displaySize == 226 ? "7.5%" : "33%",
overflow: "visible",
}}
>