Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/actions/profile/getUserInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,13 @@ export const getMyInfo = async () => {
};

export const getUserInfo = async (userid: number) => {
const session = await auth();
const accessToken = session?.accessToken;

return await fetcher(`${process.env.API_BASE_URL}/${process.env.TEST_TEAM_ID}/users/${userid}`, {
method: 'GET',
headers: {
Authorization: `Bearer ${accessToken}`,
'Content-Type': 'application/json',
},
cache: 'no-store',
Expand Down
2 changes: 1 addition & 1 deletion src/app/(profile)/(component)/ProductList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const ProductList = ({ userid, initialData }: Props) => {
);
})
) : (
<li className='col-start-1 col-end-3 m-auto mt-15 h-60 w-60 justify-self-center md:col-start-2 md:col-end-3'>
<li className='col-start-1 col-end-3 m-auto my-15 h-60 w-60 justify-self-center md:col-start-2 md:col-end-3'>
<Empty />
<p className='text-mogazoa-24px-400 mt-6 text-center'>
{errOccur ? '์ž ์‹œ ํ›„์— ์‹œ๋„ํ•ด์ฃผ์„ธ์š”' : '๋ชฉ๋ก์ด ์—†์Šต๋‹ˆ๋‹ค'}
Expand Down
2 changes: 1 addition & 1 deletion src/app/_components/ProductPost/ProductModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const ProductModal = ({ mode }: { mode: 'create' | 'edit' }) => {
const title = mode === 'create' ? '์ž‘ํ’ˆ ์ถ”๊ฐ€' : '์ž‘ํ’ˆ ์ˆ˜์ •';

return (
<Modal className='px-[30px] pb-[30px] md:px-10 md:pb-10'>
<Modal className='px-10 pb-[30px] md:px-10 md:pb-10'>
<DialogHeader>
<DialogTitle>{title}</DialogTitle>
</DialogHeader>
Expand Down
2 changes: 1 addition & 1 deletion src/app/error.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ interface Props extends Partial<FallbackProps> {
const ErrorFallback = ({ error, reset, resetErrorBoundary }: Props) => {
const router = useRouter();

const userErrMsg = errMap[error.message] || '์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ–ˆ์Šต๋‹ˆ๋‹ค';
const userErrMsg = errMap[error.message] || '๋น„์ •์ƒ์ ์ธ ์ ‘๊ทผ์ž…๋‹ˆ๋‹ค';

useEffect(() => {
document.body.classList.add('hide-footer');
Expand Down
5 changes: 3 additions & 2 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import GlobalNav from '@/components/common/gnb/GlobalNav';
import ModalContainer from '@/components/common/ModalContainer';
import SonnerToast from '@/components/common/SonnerToast';
import FloatingButton from '@/components/ui/FloatingButton';
import { cn } from '@/lib/utils';

import pretendard from '../lib/utils/fonts/pretendard';

Expand All @@ -20,10 +21,10 @@ export const metadata: Metadata = {
export default function RootLayout({ children }: Readonly<{ children: React.ReactNode }>) {
return (
<html lang='ko' className={'theme'}>
<body className={pretendard.variable}>
<body className={cn(pretendard.variable, 'flex min-h-screen flex-col')}>
<SessionProvider>
<GlobalNav />
{children}
<main className='flex-1'>{children}</main>
<FooterLazy />
<FloatingButton />
<SonnerToast />
Expand Down
2 changes: 1 addition & 1 deletion src/app/products/[productId]/components/ReviewModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const ReviewPostModal = ({ review, mode }: { review?: ReviewDetail; mode: 'creat
const category = useCurrentProductStore((state) => state.product?.category);

return (
<Modal className='px-7 pb-7 md:px-10 md:pb-10'>
<Modal className='px-10 pb-7 md:pb-10'>
<DialogHeader className='flex flex-col items-start gap-[10px]'>
<CategoryChip category={category} />
<DialogTitle>{title}</DialogTitle>
Expand Down
2 changes: 1 addition & 1 deletion src/app/products/[productId]/components/ReviewPostForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const ReviewPostForm = ({ productId }: { productId: number }) => {
<Textbox
placeholder='๋ฆฌ๋ทฐ๋ฅผ ์ž‘์„ฑํ•ด ์ฃผ์„ธ์š”.'
{...register('content')}
maxLength={500}
maxLength={300}
errorMessage={errors.content?.message}
/>
{/* <p className={`text-red-ff0000 text-mogazoa-12px-300 h-3`}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const ReviewPatchForm = ({ review }: { review: ReviewDetail }) => {
<Textbox
placeholder='๋ฆฌ๋ทฐ๋ฅผ ์ž‘์„ฑํ•ด ์ฃผ์„ธ์š”.'
{...register('content')}
maxLength={500}
maxLength={300}
errorMessage={errors.content?.message}
/>
<div className='my-scrollbar w-[295px] overflow-x-scroll md:w-[510px] xl:w-[540px]'>
Expand Down
3 changes: 1 addition & 2 deletions src/components/common/FileInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@ const FileInput = ({ maxFiles = 1, value, onChange }: FileInputProps) => {
'flex shrink-0 cursor-pointer items-center justify-center',
'border-black-353542 bg-black-252530 border',
'aspect-square w-30 rounded-[8px]',
'md:w-[135px]',
'xl:w-40',
'md:w-40',
)}
onClick={() => fileInputRef.current?.click()}
>
Expand Down
10 changes: 5 additions & 5 deletions src/components/common/Footer/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ const Footer = () => {
{/* shadow-[0_-1px_2px_0_rgba(0,0,0,1)] */}
{/* gnb ๊ทธ๋ฆผ์ž -> ์•„๋ž˜์ชฝ์—๋งŒ ์ƒ๊น€ shadow-sm shadow-black*/}
<div className='mr-20'>
<ul className='mb-5 flex items-center gap-2.5'>
<ul className='mb-5 flex flex-wrap items-center gap-2.5'>
<li className='border-white-f1f1f5/60 h-5 border-r-1 pr-2.5'>๋ฌธ์˜</li>
<li>[email protected] ,</li>
<li className='border-white-f1f1f5/60 border-r-1 pr-2.5'>[email protected]</li>
<li>
<a
href='https://github.com/TEAM3-Mogazoa/Mogazoa'
Expand All @@ -45,21 +45,21 @@ const Footer = () => {
</li>
</ul>

<ul className='mb-5 flex items-center gap-2.5'>
<ul className='mb-5 flex flex-wrap items-center gap-2.5'>
<li className='border-white-f1f1f5/60 border-r-1 pr-2.5'> ํ”ฝ์ฑ  </li>
<li className='border-white-f1f1f5/60 border-r-1 pr-2.5'>๊น€์„ฑ์ฃผ ๋‚˜์†Œ์—ฐ ๋‚จ๋งŒ์žฌ ๋ฐฐ๋ฏผ์ง€</li>
<li>์ฝ”๋“œ์ž‡ 16๊ธฐ ํŒŒํŠธ4 3ํŒ€</li>
</ul>
</div>

<ul className='mb-5 flex items-end gap-2.5 2xl:absolute 2xl:left-1/2 2xl:mt-[-8px] 2xl:-translate-x-1/2 2xl:flex-col 2xl:items-center'>
<ul className='mb-5 flex flex-wrap items-end gap-2.5 2xl:absolute 2xl:left-1/2 2xl:mt-[-8px] 2xl:-translate-x-1/2 2xl:flex-col 2xl:items-center'>
<li>
<Logo width={80} height={40} />
</li>
<li className='2xl:text-center'>&copy; 2025 by 3team All rights reserved.</li>
</ul>

<ul className='text-white-f1f1f5/60 relative flex items-end gap-5 md:absolute md:right-5 md:bottom-15 md:justify-end md:pb-10 xl:right-30'>
<ul className='text-white-f1f1f5/60 relative flex items-end gap-5 xl:absolute xl:right-30 xl:bottom-15 xl:justify-end'>
{/* md:absolute md:right-5 md:bottom-15 xl:right-30 */}
<li className='hover:text-white-f1f1f5'>
<a
Expand Down
2 changes: 1 addition & 1 deletion src/components/common/ModalUi.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const Modal = ({ showCloseButton = true, variant = 'basic', className, children
}}
>
<DialogContent
className={cn(className, contentStyle[variant])}
className={cn(className, 'min-w-[375px]', contentStyle[variant])}
showCloseButton={showCloseButton}
>
{/*๋ณธ๊ฒฉ์ ์ธ ๋ชจ๋‹ฌ ์ปจํ…์ธ */}
Expand Down
2 changes: 1 addition & 1 deletion src/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { auth } from './auth';

import type { NextRequest } from 'next/server';

const protectedRoutes = ['/mypage', '/compare'];
const protectedRoutes = ['/mypage', '/compare', '/user'];
const authRoutes = ['/signin', '/signup'];

export default async function middleware(req: NextRequest) {
Expand Down