mirror of
https://github.com/tapframe/NuvioStreaming.git
synced 2026-04-26 02:52:53 +00:00
This update includes minor formatting adjustments across the MovieContent, useMetadata, and HomeScreen components to enhance code readability. Changes involve whitespace normalization and alignment improvements, contributing to a cleaner codebase without altering functionality.
59 lines
No EOL
1.7 KiB
TypeScript
59 lines
No EOL
1.7 KiB
TypeScript
import React from 'react';
|
|
import { View, Text, StyleSheet } from 'react-native';
|
|
import { useTheme } from '../../contexts/ThemeContext';
|
|
import { StreamingContent } from '../../types/metadata';
|
|
|
|
interface MovieContentProps {
|
|
metadata: StreamingContent;
|
|
}
|
|
|
|
export const MovieContent: React.FC<MovieContentProps> = ({ metadata }) => {
|
|
const { currentTheme } = useTheme();
|
|
const hasCast = Array.isArray(metadata.cast) && metadata.cast.length > 0;
|
|
const castDisplay = hasCast ? metadata.cast!.slice(0, 5).join(', ') : '';
|
|
|
|
return (
|
|
<View style={styles.container}>
|
|
{/* Additional metadata */}
|
|
<View style={styles.additionalInfo}>
|
|
{metadata.director && (
|
|
<View style={styles.metadataRow}>
|
|
<Text style={[styles.metadataLabel, { color: currentTheme.colors.textMuted }]}>Director:</Text>
|
|
<Text style={[styles.metadataValue, { color: currentTheme.colors.text }]}>{metadata.director}</Text>
|
|
</View>
|
|
)}
|
|
|
|
|
|
{hasCast && (
|
|
<View style={styles.metadataRow}>
|
|
<Text style={[styles.metadataLabel, { color: currentTheme.colors.textMuted }]}>Cast:</Text>
|
|
<Text style={[styles.metadataValue, { color: currentTheme.colors.text }]}>{castDisplay}</Text>
|
|
</View>
|
|
)}
|
|
</View>
|
|
</View>
|
|
);
|
|
};
|
|
|
|
const styles = StyleSheet.create({
|
|
container: {
|
|
paddingHorizontal: 24,
|
|
paddingBottom: 24,
|
|
},
|
|
additionalInfo: {
|
|
gap: 12,
|
|
},
|
|
metadataRow: {
|
|
flexDirection: 'row',
|
|
alignItems: 'flex-start',
|
|
},
|
|
metadataLabel: {
|
|
fontSize: 15,
|
|
width: 70,
|
|
},
|
|
metadataValue: {
|
|
fontSize: 15,
|
|
flex: 1,
|
|
lineHeight: 24,
|
|
},
|
|
});
|