SafeAreaContextを適用
This commit is contained in:
parent
b54f2f6f7e
commit
263cb750ce
33
App.js
33
App.js
@ -29,6 +29,7 @@ import { AllTrainDiagramProvider } from "./stateBox/useAllTrainDiagram.js";
|
|||||||
import { SheetProvider } from "react-native-actions-sheet";
|
import { SheetProvider } from "react-native-actions-sheet";
|
||||||
import "./components/ActionSheetComponents/sheets.js";
|
import "./components/ActionSheetComponents/sheets.js";
|
||||||
import { TrainDelayDataProvider } from "./stateBox/useTrainDelayData.js";
|
import { TrainDelayDataProvider } from "./stateBox/useTrainDelayData.js";
|
||||||
|
import { SafeAreaProvider } from "react-native-safe-area-context";
|
||||||
LogBox.ignoreLogs([
|
LogBox.ignoreLogs([
|
||||||
"ViewPropTypes will be removed",
|
"ViewPropTypes will be removed",
|
||||||
"ColorPropType will be removed",
|
"ColorPropType will be removed",
|
||||||
@ -43,21 +44,23 @@ if (Platform.OS === "android") {
|
|||||||
export default function App() {
|
export default function App() {
|
||||||
useEffect(() => UpdateAsync(), []);
|
useEffect(() => UpdateAsync(), []);
|
||||||
return (
|
return (
|
||||||
<FavoriteStationProvider>
|
<SafeAreaProvider>
|
||||||
<TrainDelayDataProvider>
|
<FavoriteStationProvider>
|
||||||
<CurrentTrainProvider>
|
<TrainDelayDataProvider>
|
||||||
<AreaInfoProvider>
|
<CurrentTrainProvider>
|
||||||
<AllTrainDiagramProvider>
|
<AreaInfoProvider>
|
||||||
<BusAndTrainDataProvider>
|
<AllTrainDiagramProvider>
|
||||||
<SheetProvider>
|
<BusAndTrainDataProvider>
|
||||||
<AppContainer />
|
<SheetProvider>
|
||||||
</SheetProvider>
|
<AppContainer />
|
||||||
</BusAndTrainDataProvider>
|
</SheetProvider>
|
||||||
</AllTrainDiagramProvider>
|
</BusAndTrainDataProvider>
|
||||||
</AreaInfoProvider>
|
</AllTrainDiagramProvider>
|
||||||
</CurrentTrainProvider>
|
</AreaInfoProvider>
|
||||||
</TrainDelayDataProvider>
|
</CurrentTrainProvider>
|
||||||
</FavoriteStationProvider>
|
</TrainDelayDataProvider>
|
||||||
|
</FavoriteStationProvider>
|
||||||
|
</SafeAreaProvider>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
export function AppContainer() {
|
export function AppContainer() {
|
||||||
|
@ -15,6 +15,7 @@ import ActionSheet, {
|
|||||||
SheetManager,
|
SheetManager,
|
||||||
useScrollHandlers,
|
useScrollHandlers,
|
||||||
} from "react-native-actions-sheet";
|
} from "react-native-actions-sheet";
|
||||||
|
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
||||||
import { AS } from "../../storageControl";
|
import { AS } from "../../storageControl";
|
||||||
import LottieView from "lottie-react-native";
|
import LottieView from "lottie-react-native";
|
||||||
import trainList from "../../assets/originData/trainList";
|
import trainList from "../../assets/originData/trainList";
|
||||||
@ -65,7 +66,7 @@ export const EachTrainInfo = (props) => {
|
|||||||
})
|
})
|
||||||
.catch((d) => AS.setItem("trainPositionSwitch", "false"));
|
.catch((d) => AS.setItem("trainPositionSwitch", "false"));
|
||||||
}, []);
|
}, []);
|
||||||
|
const insets = useSafeAreaInsets();
|
||||||
const getStationData = (stationName) => {
|
const getStationData = (stationName) => {
|
||||||
const Stations = stationList.map((a) =>
|
const Stations = stationList.map((a) =>
|
||||||
a.filter((d) => d.StationName == stationName)
|
a.filter((d) => d.StationName == stationName)
|
||||||
@ -264,6 +265,9 @@ export const EachTrainInfo = (props) => {
|
|||||||
CustomHeaderComponent={<></>}
|
CustomHeaderComponent={<></>}
|
||||||
ref={actionSheetRef}
|
ref={actionSheetRef}
|
||||||
drawUnderStatusBar={false}
|
drawUnderStatusBar={false}
|
||||||
|
containerStyle={{
|
||||||
|
paddingBottom: insets.bottom,
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<View
|
<View
|
||||||
style={{
|
style={{
|
||||||
|
Loading…
Reference in New Issue
Block a user