mirror of
https://github.com/streamyfin/streamyfin.git
synced 2025-08-20 18:37:18 +02:00
Co-authored-by: lostb1t <coding-mosses0z@icloud.com> Co-authored-by: Fredrik Burmester <fredrik.burmester@gmail.com> Co-authored-by: Gauvain <68083474+Gauvino@users.noreply.github.com> Co-authored-by: Gauvino <uruknarb20@gmail.com> Co-authored-by: storm1er <le.storm1er@gmail.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Chris <182387676+whoopsi-daisy@users.noreply.github.com> Co-authored-by: arch-fan <55891793+arch-fan@users.noreply.github.com> Co-authored-by: Alex Kim <alexkim@Alexs-MacBook-Pro.local>
37 lines
1.1 KiB
TypeScript
37 lines
1.1 KiB
TypeScript
import type { BaseItemDto } from "@jellyfin/sdk/lib/generated-client/models";
|
|
import { useRouter } from "expo-router";
|
|
import { TouchableOpacity, View, type ViewProps } from "react-native";
|
|
import { Text } from "@/components/common/Text";
|
|
|
|
interface Props extends ViewProps {
|
|
item: BaseItemDto;
|
|
}
|
|
|
|
export const EpisodeTitleHeader: React.FC<Props> = ({ item, ...props }) => {
|
|
const router = useRouter();
|
|
|
|
return (
|
|
<View {...props}>
|
|
<Text className='font-bold text-2xl' selectable>
|
|
{item?.Name}
|
|
</Text>
|
|
<View className='flex flex-row items-center mb-1'>
|
|
<TouchableOpacity
|
|
onPress={() => {
|
|
router.push(
|
|
// @ts-expect-error
|
|
`/(auth)/series/${item.SeriesId}?seasonIndex=${item?.ParentIndexNumber}`,
|
|
);
|
|
}}
|
|
>
|
|
<Text className='opacity-50'>{item?.SeasonName}</Text>
|
|
</TouchableOpacity>
|
|
|
|
<Text className='opacity-50 mx-2'>{"—"}</Text>
|
|
<Text className='opacity-50'>{`Episode ${item.IndexNumber}`}</Text>
|
|
</View>
|
|
<Text className='opacity-50'>{item?.ProductionYear}</Text>
|
|
</View>
|
|
);
|
|
};
|