-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2631e2a
commit 80467a5
Showing
13 changed files
with
498 additions
and
11 deletions.
There are no files selected for viewing
1 change: 0 additions & 1 deletion
1
components/board/affiliate.cards.jsx → ...ard/benefit/affiliate/affiliate.cards.jsx
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
1 change: 0 additions & 1 deletion
1
components/board/discount.cards.jsx → ...board/benefit/discount/discount.cards.jsx
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
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
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,63 @@ | ||
import Link from 'next/link' | ||
import moment from 'moment' | ||
import { Table } from 'semantic-ui-react' | ||
|
||
const NoticeTable | ||
= ({notices}) => { | ||
return ( | ||
<Table | ||
celled selectable | ||
textAlign={'center'} | ||
> | ||
<Table.Header> | ||
<Table.Row> | ||
<Table.HeaderCell width={1}>id.</Table.HeaderCell> | ||
<Table.HeaderCell width={4}>제목</Table.HeaderCell> | ||
<Table.HeaderCell width={6}>내용</Table.HeaderCell> | ||
{/* <Table.HeaderCell>이미지</Table.HeaderCell> */} | ||
<Table.HeaderCell width={5}>게시 일자</Table.HeaderCell> | ||
<Table.HeaderCell width={1}>클릭수</Table.HeaderCell> | ||
</Table.Row> | ||
</Table.Header> | ||
<Table.Body> | ||
{ | ||
notices.map((notice, idx) => { | ||
const isActive = moment().isBetween(moment(notice.start_datetime), moment(notice.end_datetime)); | ||
const duration = moment(notice.end_datetime).diff(moment(notice.start_datetime), 'hours'); | ||
return ( | ||
<Link href={`/board/notice/update/${notice.id}`} key={notice.id}> | ||
<Table.Row key={notice.id} positive={isActive}> | ||
<Table.Cell>{notice.id}</Table.Cell> | ||
<Table.Cell> | ||
{ | ||
notice.link ? ( | ||
<a href={notice.link} target={'_blank'} rel={"noreferrer"}> | ||
{notice.title} | ||
</a> | ||
) : notice.title | ||
} | ||
</Table.Cell> | ||
<Table.Cell style={{whiteSpace: "pre-line", textAlign: "left"}}> | ||
{notice.content} | ||
</Table.Cell> | ||
{/* <Table.Cell> | ||
<Image href={notice.link}/> | ||
</Table.Cell> */} | ||
<Table.Cell> | ||
{moment(notice.start_datetime).format('YYYY-MM-DD HH:mm')} ~ {moment(notice.end_datetime).format('YYYY-MM-DD HH:mm')}<br/> | ||
({Number(duration/24).toFixed(0)}일 {duration%24}시간) | ||
</Table.Cell> | ||
<Table.Cell> | ||
{notice.click_count} | ||
</Table.Cell> | ||
</Table.Row> | ||
</Link> | ||
) | ||
}) | ||
} | ||
</Table.Body> | ||
</Table> | ||
) | ||
} | ||
|
||
export default NoticeTable |
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
components/board/whitebook.update.modal.jsx → ...oard/whitebook/whitebook.update.modal.jsx
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Oops, something went wrong.