mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-01-15 15:48:05 +00:00
Some checks failed
🤖 Android APK Build (Phone + TV) / 🏗️ Build Android APK (phone) (push) Has been cancelled
🤖 Android APK Build (Phone + TV) / 🏗️ Build Android APK (tv) (push) Has been cancelled
🤖 iOS IPA Build (Phone + TV) / 🏗️ Build iOS IPA (phone) (push) Has been cancelled
🔒 Lockfile Consistency Check / 🔍 Check bun.lock and package.json consistency (push) Has been cancelled
🛡️ CodeQL Analysis / 🔎 Analyze with CodeQL (actions) (push) Has been cancelled
🛡️ CodeQL Analysis / 🔎 Analyze with CodeQL (javascript-typescript) (push) Has been cancelled
🏷️🔀Merge Conflict Labeler / 🏷️ Labeling Merge Conflicts (push) Has been cancelled
🚦 Security & Quality Gate / 📝 Validate PR Title (push) Has been cancelled
🚦 Security & Quality Gate / 🔍 Vulnerable Dependencies (push) Has been cancelled
🚦 Security & Quality Gate / 🚑 Expo Doctor Check (push) Has been cancelled
🚦 Security & Quality Gate / 🔍 Lint & Test (check) (push) Has been cancelled
🚦 Security & Quality Gate / 🔍 Lint & Test (format) (push) Has been cancelled
🚦 Security & Quality Gate / 🔍 Lint & Test (lint) (push) Has been cancelled
🚦 Security & Quality Gate / 🔍 Lint & Test (typecheck) (push) Has been cancelled
🕒 Handle Stale Issues / 🗑️ Cleanup Stale Issues (push) Has been cancelled
47 lines
1.3 KiB
TypeScript
47 lines
1.3 KiB
TypeScript
import { useRouter, useSegments } from "expo-router";
|
|
import type React from "react";
|
|
import { TouchableOpacity, View, type ViewProps } from "react-native";
|
|
import { Text } from "@/components/common/Text";
|
|
import Poster from "@/components/posters/Poster";
|
|
import { useJellyseerr } from "@/hooks/useJellyseerr";
|
|
|
|
interface Props {
|
|
id: string;
|
|
posterPath?: string;
|
|
name: string;
|
|
subName?: string;
|
|
}
|
|
|
|
const PersonPoster: React.FC<Props & ViewProps> = ({
|
|
id,
|
|
posterPath,
|
|
name,
|
|
subName,
|
|
...props
|
|
}) => {
|
|
const { jellyseerrApi } = useJellyseerr();
|
|
const router = useRouter();
|
|
const segments = useSegments();
|
|
const from = (segments as string[])[2] || "(home)";
|
|
|
|
if (from === "(home)" || from === "(search)" || from === "(libraries)")
|
|
return (
|
|
<TouchableOpacity
|
|
onPress={() =>
|
|
router.push(`/(auth)/(tabs)/${from}/jellyseerr/person/${id}`)
|
|
}
|
|
>
|
|
<View className='flex flex-col w-28' {...props}>
|
|
<Poster
|
|
id={id}
|
|
url={jellyseerrApi?.imageProxy(posterPath, "w600_and_h900_bestv2")}
|
|
/>
|
|
<Text className='mt-2'>{name}</Text>
|
|
{subName && <Text className='text-xs opacity-50'>{subName}</Text>}
|
|
</View>
|
|
</TouchableOpacity>
|
|
);
|
|
};
|
|
|
|
export default PersonPoster;
|