Skip to content

Commit

Permalink
Merge pull request #324 from depromeet/fix/#323
Browse files Browse the repository at this point in the history
피드 레이아웃 컴포넌트 분기 처리, 피드 작성 완료 라우팅 수정
  • Loading branch information
YOOJS1205 authored Apr 10, 2024
2 parents 93a8873 + d5249a6 commit a374f98
Show file tree
Hide file tree
Showing 13 changed files with 21 additions and 12 deletions.
Binary file added public/assets/image/default_profile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 11 additions & 4 deletions src/app/feed/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
'use client';

import { usePathname } from 'next/navigation';

interface LayoutProps {
children: React.ReactNode;
}

export default function Layout({ children }: LayoutProps) {
const pathname = usePathname();
return (
<div>
<h1 className="flex top-0 items-center justify-center w-full h-[56px] body-16-bold border-b-[1px] border-gray-100">
피드
</h1>
<div className="top-[56px]">{children}</div>
{pathname === '/feed' && (
<h1 className="flex top-0 items-center justify-center w-full h-[56px] body-16-bold border-b-[1px] border-gray-100">
피드
</h1>
)}
<div>{children}</div>
</div>
);
}
2 changes: 1 addition & 1 deletion src/app/feed/regist/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default function Page() {
queryKey: ['get-myLog'],
});
push(
`/review/complete?storeName=${storeName}&myRevisitedCount=${
`/feed/regist/complete?storeName=${storeName}&myRevisitedCount=${
Number(myRevisitedCount) + 1
}`,
);
Expand Down
Binary file removed src/app/fonts/NanumSquareRoundB.woff2
Binary file not shown.
Binary file removed src/app/fonts/NanumSquareRoundEB.woff2
Binary file not shown.
Binary file removed src/app/fonts/NanumSquareRoundL.woff2
Binary file not shown.
Binary file removed src/app/fonts/NanumSquareRoundR.woff2
Binary file not shown.
Binary file added src/app/fonts/PretendardBold.woff2
Binary file not shown.
Binary file added src/app/fonts/PretendardLight.woff2
Binary file not shown.
Binary file added src/app/fonts/PretendardMedium.woff2
Binary file not shown.
Binary file added src/app/fonts/PretendardRegular.woff2
Binary file not shown.
12 changes: 6 additions & 6 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,22 @@ export const viewport: Viewport = {
userScalable: false,
};

const nanumSquareRound = localFont({
const pretendard = localFont({
src: [
{
path: './fonts/NanumSquareRoundL.woff2',
path: './fonts/PretendardLight.woff2',
weight: '300',
},
{
path: './fonts/NanumSquareRoundR.woff2',
path: './fonts/PretendardRegular.woff2',
weight: '400',
},
{
path: './fonts/NanumSquareRoundB.woff2',
path: './fonts/PretendardMedium.woff2',
weight: '500',
},
{
path: './fonts/NanumSquareRoundEB.woff2',
path: './fonts/PretendardBold.woff2',
weight: '700',
},
],
Expand All @@ -54,7 +54,7 @@ export default function RootLayout({
return (
<QueryClientProviders>
<WebViewContainer />
<html lang="en" className={`${nanumSquareRound.variable}`}>
<html lang="en" className={`${pretendard.variable}`}>
<head></head>
<body className="relative overscroll-y-none min-h-[100dvh] w-full max-w-[480px] mx-auto scrollbar-hide">
<Suspense>{children}</Suspense>
Expand Down
4 changes: 3 additions & 1 deletion src/components/feed/Feed/FeedProfile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import Image, { ImageProps } from 'next/image';
import { useRouter } from 'next/navigation';

import DefaultProfileImage from 'public/assets/image/default_profile.png';

interface FeedProfileProps extends Omit<ImageProps, 'id'> {
nickName: string;
isFollowed: boolean;
Expand Down Expand Up @@ -40,7 +42,7 @@ export default function FeedProfile({
className="relative w-[36px] h-[36px] rounded-[50%] overflow-hidden"
onClick={handleClickProfile}
>
<Image alt={alt} src={src} fill {...props} />
<Image alt={alt} src={src ?? DefaultProfileImage} fill {...props} />
</div>
<p>{nickName}</p>
</div>
Expand Down

0 comments on commit a374f98

Please sign in to comment.