import { FC } from "react"; import { View } from "react-native"; import dayjs from "dayjs"; import { SharedValue, useAnimatedStyle } from "react-native-reanimated"; import Animated from "react-native-reanimated"; export const ExGridViewTimePositionItem: FC<{ width: SharedValue; hour: string; }> = ({ width, hour }) => { const date = dayjs(); const formattedTime = date.format("m"); const formattedHour = date.format("H"); // if(typeString == "回送"){ // return<>; // } const animatedStyle = useAnimatedStyle(() => { const leftPosition = ((((width.value - 50) / 100) * parseInt(formattedTime)) / 60) * 100; return { left: leftPosition, }; }, [formattedTime]); if (formattedHour != hour) return <>; return ( ); };