-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[김주은] sprint10 #305
Merged
lisarnjs
merged 9 commits into
codeit-bootcamp-frontend:Next-김주은
from
marie1016:Next-김주은-sprint10
Aug 20, 2024
The head ref may contain hidden characters: "Next-\uAE40\uC8FC\uC740-sprint10"
Merged
[김주은] sprint10 #305
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
0f6c46e
refactor:서버사이드렌더링
marie1016 3c58fd1
refactor: 검색 주소창
marie1016 3d9c634
refactor:next/image사용, api요청 분리, setIsOpen 수정
marie1016 52d6b04
refactor:articleList 위치 고정
marie1016 30642d7
feat: 스프린트 미션10
marie1016 f904c86
refactor:article 배경색 수정
marie1016 7cbeee8
refactor:검색어 주소창 반영 수정
marie1016 833027c
refactor: addboard
marie1016 0bff1fb
refactor: placeholder 수정
marie1016 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
.contentWrapper { | ||
display: flex; | ||
align-items: center; | ||
justify-content: space-between; | ||
} | ||
|
||
.content { | ||
font-size: 14px; | ||
font-weight: 400; | ||
line-height: 24px; | ||
text-align: left; | ||
color: #1f2937; | ||
margin: 0; | ||
} | ||
|
||
.profile { | ||
display: flex; | ||
gap: 8px; | ||
margin: 24px 0; | ||
border-bottom: 1px solid #e5e7eb; | ||
padding-bottom: 12px; | ||
} | ||
|
||
.writer { | ||
display: flex; | ||
flex-direction: column; | ||
gap: 4px; | ||
} | ||
|
||
.nickname { | ||
font-size: 12px; | ||
font-weight: 400; | ||
line-height: 18px; | ||
color: #4b5563; | ||
margin: 0; | ||
} | ||
|
||
.time { | ||
font-size: 12px; | ||
font-weight: 400; | ||
line-height: 18px; | ||
color: #9ca3af; | ||
margin: 0; | ||
} | ||
|
||
.emptyImg { | ||
margin: 40px auto 16px; | ||
} | ||
|
||
.emptyTitle { | ||
font-size: 16px; | ||
font-weight: 400; | ||
line-height: 26px; | ||
text-align: center; | ||
color: #9ca3af; | ||
margin: 16px auto 48px; | ||
} |
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,50 @@ | ||
import CommentType from "@/types/types"; | ||
import Image from "next/image"; | ||
import styles from "./CommentsList.module.css"; | ||
|
||
interface CommentProps { | ||
comment: CommentType; | ||
} | ||
|
||
export function CommentsList({ comment }: CommentProps) { | ||
const createdDate = new Date(comment.createdAt); | ||
const updatedDate = new Date(comment.updatedAt); | ||
|
||
const timeDifference = updatedDate.getTime() - createdDate.getTime(); | ||
|
||
const hoursDifference = Math.ceil(timeDifference / (1000 * 60 * 60)); | ||
|
||
return ( | ||
<> | ||
<section className={styles.contentWrapper}> | ||
<p className={styles.content}>{comment.content}</p> | ||
<Image src="/ic_modify.png" alt="수정 아이콘" width={24} height={24} /> | ||
</section> | ||
<section className={styles.profile}> | ||
<Image src="/profile.png" alt="프로필 이미지" width={32} height={32} /> | ||
<div className={styles.writer}> | ||
<p className={styles.nickname}>{comment.writer.nickname}</p> | ||
<p className={styles.time}>{hoursDifference}시간 전</p> | ||
</div> | ||
</section> | ||
</> | ||
); | ||
} | ||
|
||
export function CommentEmpty() { | ||
return ( | ||
<> | ||
<Image | ||
src="/Img_reply_empty.png" | ||
className={styles.emptyImg} | ||
alt="아직 댓글이 없어요 이미지" | ||
width={140} | ||
height={140} | ||
/> | ||
<p className={styles.emptyTitle}> | ||
아직 댓글이 없어요, <br /> | ||
지금 댓글을 달아보세요! | ||
</p> | ||
</> | ||
); | ||
} |
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 @@ | ||
|
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,17 @@ | ||
import styles from "./Container.module.css"; | ||
interface ContainerProps { | ||
className?: string; | ||
page?: boolean; | ||
children?: React.ReactNode; | ||
} | ||
|
||
export default function Container({ | ||
className = "", | ||
page = false, | ||
children, | ||
}: ContainerProps) { | ||
const classNames = `${styles.container} ${ | ||
page ? styles.page : "" | ||
} ${className}`; | ||
return <div className={classNames}>{children}</div>; | ||
} |
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 |
---|---|---|
|
@@ -30,6 +30,7 @@ | |
text-align: left; | ||
color: #1f2937; | ||
margin-bottom: 9px; | ||
z-index: 1000; | ||
} | ||
|
||
.sortImage { | ||
|
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 |
---|---|---|
|
@@ -12,7 +12,7 @@ const Dropdown = ({ options, selectedValue, onSelect }: DropdownProps) => { | |
const [isOpen, setIsOpen] = useState(false); | ||
|
||
const toggleDropdown = () => { | ||
setIsOpen(!isOpen); | ||
setIsOpen((prev) => !prev); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 우왕 굿굿!! |
||
}; | ||
|
||
// 옵션 선택 시 실행되는 함수 | ||
|
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,48 @@ | ||
.fileWrapper { | ||
width: 1200px; | ||
margin: 0 auto; | ||
display: flex; | ||
gap: 24px; | ||
position: relative; | ||
} | ||
|
||
.file { | ||
width: 282px; | ||
height: 282px; | ||
border-radius: 12px; | ||
border: none; | ||
background-color: #f3f4f6; | ||
} | ||
|
||
.plusIcon { | ||
position: relative; | ||
top: 99px; | ||
left: 117px; | ||
} | ||
|
||
.iconTitle { | ||
position: absolute; | ||
top: 159px; | ||
left: 104px; | ||
font-size: 16px; | ||
font-weight: 400; | ||
line-height: 24px; | ||
color: #9ca3af; | ||
margin: 0; | ||
} | ||
|
||
.preview { | ||
border: none; | ||
border-radius: 12px; | ||
} | ||
|
||
.button { | ||
background: none; | ||
border: none; | ||
} | ||
|
||
.XIcon { | ||
position: absolute; | ||
left: 556px; | ||
top: 8px; | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alt 속성은 습관적으로 사용하기! 👍