部分的にtsxへ移動
This commit is contained in:
@@ -1,46 +0,0 @@
|
||||
import React from "react";
|
||||
import { View, Text, ScrollView, useWindowDimensions } from "react-native";
|
||||
|
||||
export const LandscapeTrainInfo = (props) => {
|
||||
const { leftContent, topStickyContent, children, scrollHandlers } = props;
|
||||
const { height, width } = useWindowDimensions();
|
||||
return (
|
||||
<View
|
||||
style={{
|
||||
flexDirection: "row",
|
||||
backgroundColor: "blue",
|
||||
width: width,
|
||||
height: (height / 100) * 70,
|
||||
marginBottom: 50,
|
||||
}}
|
||||
>
|
||||
<View
|
||||
style={{
|
||||
flexDirection: "column",
|
||||
height: (height / 100) * 70,
|
||||
width: width / 2,
|
||||
}}
|
||||
>
|
||||
{leftContent}
|
||||
</View>
|
||||
<ScrollView
|
||||
{...scrollHandlers}
|
||||
style={{
|
||||
width: width / 2,
|
||||
height: "auto",
|
||||
}}
|
||||
stickyHeaderIndices={[1]}
|
||||
scrollEventThrottle={16}
|
||||
onScroll={(d) => {
|
||||
// Handle scroll events
|
||||
}}
|
||||
>
|
||||
<View style={{ height: 0 }} />
|
||||
<View style={{ flexDirection: "column" }} index={1}>
|
||||
{topStickyContent}
|
||||
</View>
|
||||
{children}
|
||||
</ScrollView>
|
||||
</View>
|
||||
);
|
||||
};
|
@@ -1,8 +1,15 @@
|
||||
import React from "react";
|
||||
import React, { FC } from "react";
|
||||
import { ScrollView } from "react-native";
|
||||
import { TrainDataView } from "./TrainDataView";
|
||||
|
||||
export const LongHeader = ({
|
||||
import { trainDataType } from "@/lib/trainPositionTextArray";
|
||||
type props = {
|
||||
currentTrainData: trainDataType;
|
||||
currentPosition: string[] | undefined;
|
||||
nearTrainIDList: string[];
|
||||
openTrainInfo: (f: string) => void;
|
||||
navigate: (screen: string, data?: any) => void;
|
||||
}
|
||||
export const LongHeader:FC<props> = ({
|
||||
currentTrainData,
|
||||
currentPosition,
|
||||
nearTrainIDList,
|
@@ -1,8 +1,15 @@
|
||||
import React from "react";
|
||||
import React, { FC } from "react";
|
||||
import { ScrollView } from "react-native";
|
||||
import { TrainDataView } from "./TrainDataView";
|
||||
|
||||
export const ShortHeader = ({
|
||||
import { trainDataType } from "@/lib/trainPositionTextArray";
|
||||
type props = {
|
||||
currentTrainData: trainDataType;
|
||||
currentPosition: string[] | undefined;
|
||||
nearTrainIDList: string[];
|
||||
openTrainInfo: (f: string) => void;
|
||||
navigate: (screen: string, data?: any) => void;
|
||||
}
|
||||
export const ShortHeader:FC<props> = ({
|
||||
currentTrainData,
|
||||
currentPosition,
|
||||
nearTrainIDList,
|
@@ -1,4 +1,4 @@
|
||||
import React, { useState, useEffect } from "react";
|
||||
import React, { useState, useEffect, FC } from "react";
|
||||
import { View, TouchableOpacity, useWindowDimensions } from "react-native";
|
||||
import { StateBox } from "./StateBox";
|
||||
import { PositionBox } from "./PositionBox";
|
||||
@@ -6,14 +6,23 @@ import { useDeviceOrientationChange } from "../../../stateBox/useDeviceOrientati
|
||||
import { getStationList2 } from "../../../lib/getStationList";
|
||||
import { useCurrentTrain } from "../../../stateBox/useCurrentTrain";
|
||||
import { SheetManager } from "react-native-actions-sheet";
|
||||
import { trainPosition } from "../../../lib/trainPositionTextArray";
|
||||
import { trainDataType, trainPosition } from "@/lib/trainPositionTextArray";
|
||||
import { StationPosPushDialog } from "../../発車時刻表/LED_inside_Component/TrainPositionDataPush";
|
||||
import { getStationID } from "../../../lib/eachTrainInfoCoreLib/getStationData";
|
||||
import { useStationList } from "../../../stateBox/useStationList";
|
||||
import { useAllTrainDiagram } from "@/stateBox/useAllTrainDiagram";
|
||||
import { customTrainDataDetector } from "@/components/custom-train-data";
|
||||
|
||||
export const TrainDataView = ({
|
||||
|
||||
type props = {
|
||||
currentTrainData: trainDataType;
|
||||
currentPosition: string[] | undefined;
|
||||
nearTrainIDList: string[];
|
||||
openTrainInfo: (f: string) => void;
|
||||
mode?: 0 | 1 | 2; //0:通常,1:コンパクト,2:横並び
|
||||
navigate: (screen: string, data?: any) => void;
|
||||
}
|
||||
export const TrainDataView:FC<props> = ({
|
||||
currentTrainData,
|
||||
currentPosition,
|
||||
nearTrainIDList,
|
||||
|
@@ -19,6 +19,7 @@ export type trainTypeID =
|
||||
export type CustomTrainData = {
|
||||
ToData?: string;
|
||||
TrainNumber?: string;
|
||||
TrainNumberOverride?: string;
|
||||
id?: string;
|
||||
img?: string;
|
||||
isWanman?: boolean;
|
||||
|
@@ -18,7 +18,7 @@ export type trainDataType = {
|
||||
Line?: string;
|
||||
PosNum?: number;
|
||||
Type?: string;
|
||||
delay?: string | number;
|
||||
delay?: "入線" | number;
|
||||
num?: string;
|
||||
};
|
||||
type trainData = (
|
||||
|
Reference in New Issue
Block a user