-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ : #492 - FootPrintItem 컴포넌트 기본 로직 정의
- Loading branch information
Showing
3 changed files
with
63 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
src/app/footprints/_Components/FootprintItem/FootprintItem.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
.footprint-item { | ||
display: flex; | ||
flex-direction: column; | ||
|
||
&__title{ | ||
|
||
} | ||
|
||
&__createdAt{ | ||
|
||
} | ||
|
||
&__tags{ | ||
|
||
} | ||
} |