幅指定をuseWindowDimensionsに変更

This commit is contained in:
harukin-OneMix4
2024-02-11 23:54:55 +09:00
parent 38052abd30
commit 93529f4f7d
2 changed files with 9 additions and 13 deletions

View File

@@ -1,5 +1,10 @@
import React from "react";
import { View, Text, TouchableOpacity } from "react-native";
import {
View,
Text,
TouchableOpacity,
useWindowDimensions,
} from "react-native";
import { StateBox } from "./StateBox";
import {
heightPercentageToDP,
@@ -13,13 +18,14 @@ export const TrainDataView = ({
openTrainInfo,
mode = 0,
}) => {
const { width, height } = useWindowDimensions();
return (
<View
style={{
flexDirection: "row",
//minHeight: 200,
//height: heightPercentageToDP("20%"),
width: widthPercentageToDP("100%"),
width: width,
flex: 1,
}}
>