props를 다음과 같이 넘겨주고
<Product_fashion Data={fashionData} />
props의 데이터 지정을 이렇게 했는데 어째서인지 부모 컴포넌트에서 계속 에러가 생깁니다
왜이런지 알 수 있을까요 ㅠ
export default function Product_fashion(props: { Data: productType[] }) {
console.log(props.Data);
return (
<>
</>
);
}
type alias는 다음과 같이 작성하였습니다
export type productType = {
category: string;
description: string;
id: number;
image: string;
price: number;
rating: {
rate: number;
count: number;
};
title: string;
};