Skip to content

Commit

Permalink
✨ : #492 - FootPrintItem 컴포넌트 기본 로직 정의
Browse files Browse the repository at this point in the history
  • Loading branch information
MinwooP committed Apr 20, 2024
1 parent f878dd7 commit 3befbb9
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ export default function FootPrintList({ year, plan }: FootPrintListProps) {
// - plan.planId === -2 => 해당 year에 해당하는 계획이 없는 것

return (
<div>{`${year}${plan.planTitle}에 해당하는 FootPrintList 출력`}</div>
<ul>{`${year}${plan.planTitle}에 해당하는 FootPrintList 출력`}</ul>

// TODO: footPrintList.map((item)=>{return <FootPrintItem props={item. ~}/>})
);
}
44 changes: 44 additions & 0 deletions src/app/footprints/_Components/FootprintItem/FootprintItem.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import { AjajaButton, Tag } from '@/components';
import classNames from 'classnames';
import Link from 'next/link';
import React from 'react';
import './index.scss';

interface FootprintItemProps {
id: number;
iconNumber: number;
title: string;
createdAt: string;
ajajas: number;
tags: string[];
}

export default function FootprintItem({
id,
iconNumber,
title,
createdAt,
ajajas,
tags,
}: FootprintItemProps) {
return (
<li key={id}>
<Link
href={`/발자취단건조회/${id}`}
className={classNames('footprint-item')}>
<div className={classNames('footprint-item__title')}>
{iconNumber + title}
</div>
<div className={classNames('footprint-item__createAt')}>
{`${createdAt} 작성`}
</div>
<AjajaButton ajajaCount={ajajas} isFilled={true} disabled />
<div className={classNames('footprint-item__tags')}>
{tags.map((tagString, idx) => {
return <Tag key={idx}>{tagString}</Tag>;
})}
</div>
</Link>
</li>
);
}
16 changes: 16 additions & 0 deletions src/app/footprints/_Components/FootprintItem/index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
.footprint-item {
display: flex;
flex-direction: column;

&__title{

}

&__createdAt{

}

&__tags{

}
}

0 comments on commit 3befbb9

Please sign in to comment.