mirror of
https://github.com/movie-web/native-app.git
synced 2025-09-13 14:53:24 +00:00
chore: use typedef instead of inline type
This commit is contained in:
@@ -2,11 +2,15 @@ import { Image, View } from "react-native";
|
||||
|
||||
import { Text } from "~/components/ui/Text";
|
||||
|
||||
export default function Item({
|
||||
data,
|
||||
}: {
|
||||
data: { title: string; type: string; year: number; posterUrl: string };
|
||||
}) {
|
||||
export interface ItemData {
|
||||
id: string;
|
||||
title: string;
|
||||
type: "movie" | "tv";
|
||||
year: number;
|
||||
posterUrl: string;
|
||||
}
|
||||
|
||||
export default function Item({ data }: { data: ItemData }) {
|
||||
const { title, type, year, posterUrl } = data;
|
||||
|
||||
return (
|
||||
|
Reference in New Issue
Block a user