Skip to content

Commit

Permalink
Merge pull request #88 from DoTheZ-Team/GLUE-383-글작성자-이미지-API-연결
Browse files Browse the repository at this point in the history
GLUE-383 프로필 사용자 이미지 API 연결
  • Loading branch information
Collection50 authored Jun 12, 2024
2 parents 515f8cc + 8cc4006 commit 4af7e65
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export interface PostDetailResponse {
categoryName: string;

photoUrls: string[];
profile: string;

postStickerItems: Sticker[];
postHashtags: string[];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ import { motion } from 'framer-motion';
import { Button, Copy, Input } from '@/components/Common';
import { formatDate } from '@/utils';
import { usePortal } from '@/hooks';
import Image from 'next/image';
import { usePostDetailContext } from '../PostDetailFetcher/PostDetailContext';

import { useHandlePostDetail } from './hooks';

export default function PostDetailHeader({ postId }: { postId: string }) {
const {
postDetail: { title, createdAt, memberId, nickname },
postDetail: { title, createdAt, memberId, nickname, profile },
loginMemberId,
} = usePostDetailContext();

Expand Down Expand Up @@ -50,7 +51,14 @@ export default function PostDetailHeader({ postId }: { postId: string }) {

<div className="flex items-center justify-between px-5 border-b-1 border-[#D3D2D1] py-10">
<div className="flex items-center gap-13">
<div className="w-30 h-30 rounded-full bg-primary" />
<Image
loader={() => profile}
src={profile}
width={30}
height={30}
alt="profile alt"
className="rounded-full"
/>

<p>{nickname}</p>
<p className="text-[#BABABA]">{formatDate(createdAt)}</p>
Expand Down

0 comments on commit 4af7e65

Please sign in to comment.