chore: small fixes

This commit is contained in:
Fredrik Burmester
2024-10-05 19:19:34 +02:00
parent 0080874213
commit 81aafa26d4
8 changed files with 47 additions and 32 deletions

View File

@@ -23,7 +23,7 @@ export const HourHeader = ({ height }: { height: number }) => {
};
const HourCell = ({ hour }: { hour: Date }) => (
<View className="w-[200px] flex items-center justify-center border-r border-gray-300">
<View className="w-[200px] flex items-center justify-center bg-neutral-800">
<Text className="text-xs text-gray-600">
{hour.toLocaleTimeString([], {
hour: "2-digit",

View File

@@ -8,10 +8,12 @@ export const LiveTVGuideRow = ({
channel,
programs,
scrollX = 0,
isVisible = true,
}: {
channel: BaseItemDto;
programs?: BaseItemDto[] | null;
scrollX?: number;
isVisible?: boolean;
}) => {
const positionRefs = useRef<{ [key: string]: number }>({});
const screenWidth = Dimensions.get("window").width;
@@ -46,6 +48,10 @@ export const LiveTVGuideRow = ({
return now >= start && now <= end;
};
if (!isVisible) {
return <View style={{ height: 64 }} />;
}
return (
<View key={channel.ChannelNumber} className="flex flex-row h-16">
{programsWithPositions?.map((p) => (