-
Notifications
You must be signed in to change notification settings - Fork 5
feat: 알바토크 상세페이지 (수정 중) #141
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
Conversation
|
💄 Storybook: https://673dcf13c9a3a1189a7c6fd4-uzacgwjpjj.chromatic.com/ # Chromatic에서 생성된 Storybook URL |
cccwon2
left a comment
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.
수고하셨습니다.
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.
post.d.ts 쓰면 될꺼 같아요.
// 게시글 작성자 타입
export interface WriterType {
id: number;
nickname: string;
imageUrl: string;
}
// 게시글 등록/상세/수정/좋아요 응답
export interface PostDetailResponse {
writer: WriterType;
updatedAt: Date;
createdAt: Date;
commentCount: number;
likeCount: number;
imageUrl: string;
content: string;
title: string;
id: number;
isLiked: boolean;
}
// 게시글 목록 타입
export interface PostListType {
writer: WriterType;
updatedAt: Date;
createdAt: Date;
commentCount: number;
likeCount: number;
imageUrl: string;
content: string;
title: string;
id: number;
}
// 게시글 목록 응답
export interface PostListResponse {
data: Array<PostListType>;
nextCursor: number | null;
}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.
폴더 명을 albatalk, albatalks 식으로 소문자로 변경해 주세요~
| <h1 className="text-[16px] font-semibold sm:text-[20px] lg:text-[24px]">{post.title}</h1> | ||
| {post.writer.id === user?.id && ( | ||
| <div className="relative" ref={optionsRef}> | ||
| <button onClick={() => setShowOptions(!showOptions)} className="text-grayscale-500"> |
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.
button 태그에는 type="button" 을 추가해주세욥~
| {post.writer.id === user?.id && ( | ||
| <div className="relative" ref={optionsRef}> | ||
| <button onClick={() => setShowOptions(!showOptions)} className="text-grayscale-500"> | ||
| <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> |
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.
요건 어떤건지 잘 모르겠지만 svg는 별도 컴포넌트로 분리하는게 좋겠네요
| alt="Comments" | ||
| width={24} | ||
| height={24} | ||
| className="h-[22px] w-[22px] sm:h-6 sm:w-6" |
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.
sm: 은 불필요한 코드입니다!
반응형 구현 방법 :
태블릿-> md:~
데스크탑-> lg: ~
현재 좋아요 기능을 제외하고 모두 구현된 상태입니다.