diff --git a/src/api/core.ts b/src/api/core.ts index e306347..0366459 100644 --- a/src/api/core.ts +++ b/src/api/core.ts @@ -24,10 +24,7 @@ axiosInstance.interceptors.request.use( if (!accessToken) { return config; } - config.headers.set( - 'Authorization', - `Bearer ${process.env.NEXT_PUBLIC_MASTER_TOKEN}`, - ); + config.headers.set('Authorization', `Bearer ${accessToken}`); return config; }, (error: AxiosError) => { diff --git a/src/app/(publish)/components/PostEditor/index.tsx b/src/app/(publish)/components/PostEditor/index.tsx index c9e5ac2..86de6d9 100644 --- a/src/app/(publish)/components/PostEditor/index.tsx +++ b/src/app/(publish)/components/PostEditor/index.tsx @@ -29,15 +29,14 @@ const Editor = dynamic(() => import('@/components/Common/Editor'), { interface PostEditorProp { postDetail?: Partial; + hashtagNames?: string[]; } -export default function PostEditor({ postDetail = {} }: PostEditorProp) { - const { - title = '', - categoryName = '카테고리 선택', - content, - hashtags: initialData = [], - } = postDetail; +export default function PostEditor({ + postDetail = {}, + hashtagNames: initialData = [], +}: PostEditorProp) { + const { title = '', categoryName = '카테고리 선택', content } = postDetail; const port = usePortal({ id: 'publish-container' }); diff --git a/src/app/blog/[blogId]/components/Albums/Slider.tsx b/src/app/blog/[blogId]/components/Albums/Slider.tsx index 5a013c7..c24f1d7 100644 --- a/src/app/blog/[blogId]/components/Albums/Slider.tsx +++ b/src/app/blog/[blogId]/components/Albums/Slider.tsx @@ -19,6 +19,7 @@ export default function Slider({ photos }: { photos: string[] }) {
photo || temp} alt="photo" src={photo || temp} layout="fill" diff --git a/src/app/blog/[blogId]/components/BlogBackground/index.tsx b/src/app/blog/[blogId]/components/BlogBackground/index.tsx index 499d3a6..b64f45a 100644 --- a/src/app/blog/[blogId]/components/BlogBackground/index.tsx +++ b/src/app/blog/[blogId]/components/BlogBackground/index.tsx @@ -12,6 +12,7 @@ export default function BlogBackground() {
background} src={background} alt="background" layout="fill" diff --git a/src/app/blog/[blogId]/components/Board/BoardContent.tsx b/src/app/blog/[blogId]/components/Board/BoardContent.tsx index 1d28b70..2efa482 100644 --- a/src/app/blog/[blogId]/components/Board/BoardContent.tsx +++ b/src/app/blog/[blogId]/components/Board/BoardContent.tsx @@ -32,6 +32,7 @@ export default function BoardContent({ >
photoUrl || '/tempImage/4.jpg'} src={photoUrl || '/tempImage/4.jpg'} alt={String(postId)} layout="fill" diff --git a/src/app/blog/[blogId]/components/ProfileBox/index.tsx b/src/app/blog/[blogId]/components/ProfileBox/index.tsx index 0a0240a..236dcae 100644 --- a/src/app/blog/[blogId]/components/ProfileBox/index.tsx +++ b/src/app/blog/[blogId]/components/ProfileBox/index.tsx @@ -16,7 +16,13 @@ export default function ProfileBox() { return (
- profile + profile} + src={profile} + alt="profile" + layout="fill" + objectFit="cover" + />
{memberName}

diff --git a/src/app/blog/[blogId]/post/[postId]/components/CommentsWrapper/Comments/ChildComments/ChildComments.tsx b/src/app/blog/[blogId]/post/[postId]/components/CommentsWrapper/Comments/ChildComments/ChildComments.tsx index cefadfe..ecb0809 100644 --- a/src/app/blog/[blogId]/post/[postId]/components/CommentsWrapper/Comments/ChildComments/ChildComments.tsx +++ b/src/app/blog/[blogId]/post/[postId]/components/CommentsWrapper/Comments/ChildComments/ChildComments.tsx @@ -25,6 +25,7 @@ export default function ChildComments({ commentId }: { commentId: number }) {

{blogProfile ? ( blogProfile} src={blogProfile} width={40} height={40} diff --git a/src/app/blog/[blogId]/post/[postId]/components/CommentsWrapper/Comments/Comment.tsx b/src/app/blog/[blogId]/post/[postId]/components/CommentsWrapper/Comments/Comment.tsx index 76b3d9e..443ba85 100644 --- a/src/app/blog/[blogId]/post/[postId]/components/CommentsWrapper/Comments/Comment.tsx +++ b/src/app/blog/[blogId]/post/[postId]/components/CommentsWrapper/Comments/Comment.tsx @@ -29,7 +29,13 @@ export default function Comment(commentItem: CommentProp & { postId: number }) { >
{blogProfile ? ( - {blogTitle} + blogProfile} + src={blogProfile} + width={40} + height={40} + alt={blogTitle} + /> ) : (
)} diff --git a/src/app/blog/[blogId]/post/[postId]/components/CommentsWrapper/index.tsx b/src/app/blog/[blogId]/post/[postId]/components/CommentsWrapper/index.tsx index fa4ed49..7072f6c 100644 --- a/src/app/blog/[blogId]/post/[postId]/components/CommentsWrapper/index.tsx +++ b/src/app/blog/[blogId]/post/[postId]/components/CommentsWrapper/index.tsx @@ -12,7 +12,7 @@ export default function CommentsWrapper({ postId }: { postId: string }) { const { handleLike, likeCount, like = 0 } = useLike(Number(postId)); return ( -
+

댓글

diff --git a/src/app/blog/[blogId]/post/[postId]/components/PostDetailFetcher/types.ts b/src/app/blog/[blogId]/post/[postId]/components/PostDetailFetcher/types.ts index ec206c2..0809ad7 100644 --- a/src/app/blog/[blogId]/post/[postId]/components/PostDetailFetcher/types.ts +++ b/src/app/blog/[blogId]/post/[postId]/components/PostDetailFetcher/types.ts @@ -24,13 +24,14 @@ export interface PostDetailResponse { memberId: number; blogId: number; isLike: boolean; - isSubscribe: boolean; categoryName: string; - hashtags: string[]; photoUrls: string[]; postStickerItems: Sticker[]; + postHashtags: string[]; + isSubscribe: boolean; + nickname: string; }; loginMemberId: number; diff --git a/src/app/blog/[blogId]/post/[postId]/components/PostDetailHeader/index.tsx b/src/app/blog/[blogId]/post/[postId]/components/PostDetailHeader/index.tsx index 094fd53..5096aaf 100644 --- a/src/app/blog/[blogId]/post/[postId]/components/PostDetailHeader/index.tsx +++ b/src/app/blog/[blogId]/post/[postId]/components/PostDetailHeader/index.tsx @@ -11,11 +11,11 @@ import { useDeletePosting } from './api/quries'; export default function PostDetailHeader({ postId }: { postId: string }) { const { - postDetail: { title, createdAt, memberId }, + postDetail: { title, createdAt, memberId, nickname }, loginMemberId, } = usePostDetailContext(); const { follow, handleFollow } = useFollow(Number(postId)); - const name = '김성민'; + const port = usePortal({ id: 'edit-container' }); const { mutate } = useDeletePosting(); @@ -58,7 +58,7 @@ export default function PostDetailHeader({ postId }: { postId: string }) { {/* TODO: Image fedch */}
-

{name}

+

{nickname}

{formatDate(createdAt)}

diff --git a/src/app/blog/[blogId]/post/[postId]/page.tsx b/src/app/blog/[blogId]/post/[postId]/page.tsx index b81f4c1..d87d824 100644 --- a/src/app/blog/[blogId]/post/[postId]/page.tsx +++ b/src/app/blog/[blogId]/post/[postId]/page.tsx @@ -18,7 +18,7 @@ export default function Page({ params: { postId: string }; }) { const { - postDetail: { content }, + postDetail: { content, postHashtags }, } = usePostDetailContext(); return ( @@ -29,6 +29,15 @@ export default function Page({ +
+ {postHashtags.map((hashtag, index) => ( + // eslint-disable-next-line +
+ #{hashtag} +
+ ))} +
+ ); diff --git a/src/app/match/page.tsx b/src/app/match/page.tsx index c44db9a..8acf510 100644 --- a/src/app/match/page.tsx +++ b/src/app/match/page.tsx @@ -22,6 +22,7 @@ export default function Page() { profile} src={profile} fill objectFit="contain" diff --git a/src/app/mypage/components/Common/FileThumbnails.tsx b/src/app/mypage/components/Common/FileThumbnails.tsx index 9b2ca12..709a20d 100644 --- a/src/app/mypage/components/Common/FileThumbnails.tsx +++ b/src/app/mypage/components/Common/FileThumbnails.tsx @@ -40,6 +40,7 @@ export default function FileThumbnails({ )} > preview} src={preview} alt="Selected Image" layout="fill" diff --git a/src/app/search/components/BlogList/BlogCard.tsx b/src/app/search/components/BlogList/BlogCard.tsx index bafa57c..e656a53 100644 --- a/src/app/search/components/BlogList/BlogCard.tsx +++ b/src/app/search/components/BlogList/BlogCard.tsx @@ -21,6 +21,7 @@ export default function BlogCard({ >
photoUrl} src={photoUrl} alt="bg" layout="fill" diff --git a/src/app/subscribe/components/FeedBox/index.tsx b/src/app/subscribe/components/FeedBox/index.tsx index 5a5c567..7047fa6 100644 --- a/src/app/subscribe/components/FeedBox/index.tsx +++ b/src/app/subscribe/components/FeedBox/index.tsx @@ -33,6 +33,7 @@ export default function FeedBox({
photo || fallbackImage} src={photo || fallbackImage} alt="image" layout="fill" diff --git a/src/components/Common/Icons/Mypage.tsx b/src/components/Common/Icons/Mypage.tsx new file mode 100644 index 0000000..f1bf46a --- /dev/null +++ b/src/components/Common/Icons/Mypage.tsx @@ -0,0 +1,29 @@ +import { SVGProps } from 'react'; + +export default function Mypage({ ...props }: SVGProps) { + return ( + + + + + ); +} diff --git a/src/components/Common/Icons/index.tsx b/src/components/Common/Icons/index.tsx index 32fb9f4..79ba493 100644 --- a/src/components/Common/Icons/index.tsx +++ b/src/components/Common/Icons/index.tsx @@ -15,3 +15,4 @@ export { default as PaginationLeft } from './PaginationLeft'; export { default as PaginationRight } from './PaginationRight'; export { default as UpArrow } from './UpArrow'; export { default as DownArrow } from './DownArrow'; +export { default as Mypage } from './Mypage'; diff --git a/src/components/MouseImageGallery/index.tsx b/src/components/MouseImageGallery/index.tsx index b28bad3..8e7cf50 100644 --- a/src/components/MouseImageGallery/index.tsx +++ b/src/components/MouseImageGallery/index.tsx @@ -4,7 +4,7 @@ import Image from 'next/image'; import Link from 'next/link'; import { MouseEvent, useRef } from 'react'; import { range } from '@/utils'; -import { LikeIcon, Trending, Write } from '../Common'; +import { LikeIcon, Mypage, Trending, Write } from '../Common'; export default function MouseImageGallery() { let steps = 0; @@ -100,6 +100,10 @@ export default function MouseImageGallery() { + + + +