Skip to content

Commit

Permalink
feat(domain/my-info): feat: link my-info api
Browse files Browse the repository at this point in the history
  • Loading branch information
JSH-data committed Feb 3, 2024
1 parent 4e2ef8a commit 335ec12
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 28 deletions.
48 changes: 26 additions & 22 deletions app/my-info/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,17 @@ interface MyInfo {
id: number;
nickname: string;
profileImage: string;
purchaseList: [];
reviewList: [];
purchaseList: MyInfoItem[];
reviewList: MyInfoItem[];
}

interface MyInfoItem {
artThumbnail: string;
artTitle: string;
id: number;
nickname: string;
place: string;
visitorCount: number;
}

function MyInfoPage() {
Expand Down Expand Up @@ -100,29 +109,27 @@ function MyInfoPage() {
<History>
<ul>
{content === "work"
? purchaseList.map((value, idx) => (
<CardboardList key={`${value.title}-${idx}`}>
? myInfo.purchaseList.map((value, idx) => (
<CardboardList key={`${value.artTitle}-${idx}`}>
<Cardboard
image={value.image}
title={value.title}
start_at={value.start_at}
price={value.price}
visitor_count={value.vistor_cnt}
space={value.space}
price={"0"}
image={value.artThumbnail}
title={value.artTitle}
visitor_count={value.visitorCount}
space={value.place}
>
test
</Cardboard>
</CardboardList>
))
: reviewList.map((value) => (
<CardboardList key={value.title}>
: myInfo.reviewList.map((value) => (
<CardboardList key={value.artTitle}>
<ReviewCardboard
image={value.image}
title={value.title}
start_at={value.start_at}
price={value.price}
visitor_count={value.vistor_cnt}
space={value.space}
price={"0"}
image={value.artThumbnail}
title={value.artTitle}
visitor_count={value.visitorCount}
space={value.place}
>
test
</ReviewCardboard>
Expand All @@ -143,10 +150,7 @@ const Headline = styled.div`
margin: 0 auto;
`;

const History = styled.div`
max-height: 600px;
overflow: scroll;
`;
const History = styled.div``;

const CardboardList = styled.li`
${({ theme }) => {
Expand Down
6 changes: 3 additions & 3 deletions components/domains/my-info/cardboard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import Typography from "@/components/common/text/Typography";
interface Props {
image: string;
title: string;
start_at: string;
price: string;
start_at?: string;
price?: string;
visitor_count: number;
space: string;
review?: string;
Expand Down Expand Up @@ -57,7 +57,7 @@ export function Cardboard({ image, title, children, ...rest }: Props) {
return (
<SpacerSkleton justify="space-between" style={{ width: "100%" }}>
<SpacerSkleton gap={38}>
<Image src={image} width={150} height={212} alt="test-poster" />
<img src={image} width={150} height={212} alt="test-poster" />
<SpacerSkleton type="vertical" gap={15}>
<h5>
<Typography typo="subhead03">{title}</Typography>
Expand Down
6 changes: 3 additions & 3 deletions components/domains/my-info/reviewCardboard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import Typography from "@/components/common/text/Typography";
interface Props {
image: string;
title: string;
start_at: string;
start_at?: string;
price: string;
visitor_count: number;
space: string;
Expand All @@ -29,7 +29,7 @@ type Entries<T> = {
[K in keyof T]: [K, T[K]];
}[keyof T][];

export function ReviewCardboard({ image, title, children, ...rest }: Props) {
export function ReviewCardboard({ image, title, ...rest }: Props) {
const reviewTextRef = useRef<HTMLDivElement | null>(null);
const [isShow, setShow] = useState(false);

Expand Down Expand Up @@ -100,7 +100,7 @@ export function ReviewCardboard({ image, title, children, ...rest }: Props) {
</SpacerSkleton>
</DefaultModal>
<SpacerSkleton gap={38} style={{ width: "100%" }}>
<Image src={image} width={150} height={212} alt="test-poster" />
<img src={image} width={150} height={212} alt="test-poster" />
<SpacerSkleton
type="vertical"
gap={15}
Expand Down

0 comments on commit 335ec12

Please sign in to comment.