mirror of
https://github.com/movie-web/native-app.git
synced 2025-09-13 14:53:24 +00:00
feat: implement search via tmdb package
This commit is contained in:
@@ -1,25 +1,25 @@
|
||||
import { Image, View } from "react-native";
|
||||
|
||||
import { TMDB_POSTER_PATH } from "~/app/constants/General";
|
||||
import { Text } from "~/components/ui/Text";
|
||||
|
||||
export default function Item() {
|
||||
export default function Item({ data }: { data: { title: string, type: string, year: number, posterUrl: string } }) {
|
||||
const { title, type, year, posterUrl } = data;
|
||||
|
||||
return (
|
||||
<View className="w-full">
|
||||
<View className="mb-2 aspect-[9/14] w-full overflow-hidden rounded-2xl">
|
||||
<Image
|
||||
source={{
|
||||
uri: `${TMDB_POSTER_PATH}/w342//gdIrmf2DdY5mgN6ycVP0XlzKzbE.jpg`,
|
||||
uri: posterUrl,
|
||||
width: 200,
|
||||
}}
|
||||
className="h-full w-full object-cover"
|
||||
/>
|
||||
</View>
|
||||
<Text className="font-bold">Hamilton</Text>
|
||||
<Text className="font-bold">{title}</Text>
|
||||
<View className="flex-row items-center gap-3">
|
||||
<Text className="text-xs text-gray-600">Movie</Text>
|
||||
<Text className="text-xs text-gray-600">{type}</Text>
|
||||
<View className="h-1 w-1 rounded-3xl bg-gray-600" />
|
||||
<Text className="text-sm text-gray-600">2023</Text>
|
||||
<Text className="text-sm text-gray-600">{year}</Text>
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
|
Reference in New Issue
Block a user