Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | 1x 1x | import { MatchScore } from '@sb/types';
import { Text, View } from 'react-native';
const MatchSchedule = ({ scheduleFor, time }: { scheduleFor: string; time: string }) => {
//TODO: format date and time for specific locale and strategy.
return (
<View className={''}>
<Text className={'text-text-main font-normal'}>{scheduleFor}</Text>
<Text className={'text-text-main font-normal'}>{time}</Text>
</View>
);
};
const MatchScoreView = ({ score }: { score: MatchScore }) => {
return (
<View className={'flex flex-row justify-end'}>
{score.sets && score.sets.length > 0 && (
<View className={'flex flex-col items-center pl-2'}>
<Text className={'text-accent font-Bold'}>{score.sets[0]}</Text>
<Text className={'text-accent font-Bold'}>{score.sets[1]}</Text>
</View>
)}
{score.games && score.games.length > 0 && (
<View className={'flex flex-col items-center pl-2'}>
<Text className={'text-text-main font-normal'}>{score.games[0]}</Text>
<Text className={'text-text-main font-normal'}>{score.games[1]}</Text>
</View>
)}
{score.points && score.points.length > 0 && (
<View className={'flex flex-col items-center pl-3'}>
<Text className={'text-text-main font-normal'}>{score.points[0]}</Text>
<Text className={'text-text-main font-normal'}>{score.points[1]}</Text>
</View>
)}
</View>
);
};
export { MatchSchedule, MatchScoreView };
|