Skip to content

Conversation

@imtaejunk
Copy link
Collaborator

image
image
image
image
현재 좋아요 기능을 제외하고 모두 구현된 상태입니다.

@github-actions
Copy link

💄 Storybook: https://673dcf13c9a3a1189a7c6fd4-uzacgwjpjj.chromatic.com/ # Chromatic에서 생성된 Storybook URL
🕖 Update: 2024년 12월 13일 12시 54분 08초 # 현재 시간

Copy link
Contributor

@cccwon2 cccwon2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고하셨습니다.

Copy link
Contributor

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;
}

Copy link
Contributor

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">
Copy link
Collaborator

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">
Copy link
Collaborator

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"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sm: 은 불필요한 코드입니다!

반응형 구현 방법 :
태블릿-> md:~
데스크탑-> lg: ~

@hongggyelim hongggyelim merged commit 0ac1f10 into dev Dec 13, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants