Skip to content

Commit e79ef17

Browse files
committed
데브 머지
1 parent 4ac6759 commit e79ef17

File tree

123 files changed

+1982
-520
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

123 files changed

+1982
-520
lines changed

next.config.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
import type { NextConfig } from 'next';
22

33
const nextConfig: NextConfig = {
4-
54
// webpack 설정
65
webpack: (config) => {
6+
env: {
7+
NPUBLIC_API_URL: process.env.NEXT_PUBLIC_API_URL;
8+
}
9+
710
// @ts-expect-error 타입 에러 무시
811
const fileLoaderRule = config.module.rules.find((rule) => rule.test?.test?.('.svg'));
912

@@ -37,7 +40,7 @@ const nextConfig: NextConfig = {
3740
loaders: ['@svgr/webpack'],
3841
as: '*.js',
3942
},
40-
}
43+
},
4144
},
4245
};
4346

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "0.1.0",
44
"private": true,
55
"scripts": {
6-
"dev": "next dev --turbopack",
6+
"dev": "next dev",
77
"format": "prettier --write \"src/**/*.{ts,tsx,js,jsx}\"",
88
"format:check": "prettier --check \"src/**/*.{ts,tsx,js,jsx}\"",
99
"prepare": "husky",
@@ -60,4 +60,4 @@
6060
},
6161
"homepage": "https://github.com/prgrms-web-devcourse-final-project/WEB5_6_HaeDokCoding_FE#readme",
6262
"description": ""
63-
}
63+
}

src/app/api/config/appConfig.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export const getApi =
2+
process.env.NODE_ENV === 'development'
3+
? process.env.NEXT_PUBLIC_API_URL_DEV
4+
: process.env.NEXT_PUBLIC_API_URL_PROD;

src/app/community/[id]/loading.tsx

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
function loading() {
2+
return (
3+
<div className="w-full mb-10 flex relative animate-pulse">
4+
{/* 메인 콘텐츠 */}
5+
<article className="page-layout max-w-[824px] flex-1 z-5 space-y-6 mt-15">
6+
{/* DetailHeader 자리 */}
7+
<div className="h-6 w-15 bg-gray rounded-md" />
8+
9+
{/* Title 자리 */}
10+
<div className="h-12 w-full bg-gray rounded-md" />
11+
<div className="h-7 w-20 -mt-2 bg-gray rounded-md" />
12+
13+
{/* Content 자리 */}
14+
<div className="space-y-2 mt-5">
15+
<div className="h-70 w-full bg-gray rounded-md" />
16+
</div>
17+
18+
{/* 댓글 */}
19+
<div className="h-9 w-full bg-gray rounded-md mt-4" />
20+
<div className="space-y-3">
21+
{[...Array(2)].map((_, i) => (
22+
<div key={i} className="h-16 w-full bg-gray rounded-md" />
23+
))}
24+
</div>
25+
</article>
26+
</div>
27+
);
28+
}
29+
30+
export default loading;

src/app/community/[id]/page.tsx

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,20 @@
1-
import CommentList from '@/domains/community/detail/comment/CommentList';
2-
import DetailComment from '@/domains/community/detail/comment/DetailComment';
31
import DetailContent from '@/domains/community/detail/DetailContent';
42
import DetailHeader from '@/domains/community/detail/DetailHeader';
53
import DetailTitle from '@/domains/community/detail/DetailTitle';
64
import DetailTabDesktop from '@/domains/community/detail/tab/DetailTabDesktop';
7-
import StarBg from '@/domains/shared/starBg/StarBg';
5+
import Comment from '@/domains/shared/components/comment/Comment';
6+
import StarBg from '@/domains/shared/components/star-bg/StarBg';
87

98
function Page() {
109
return (
11-
<div className="w-full mb-10 flex relative">
10+
<div className="w-full relative">
1211
<StarBg className="w-full h-32 absolute"></StarBg>
13-
<article className="page-layout max-w-824 flex-1 z-5">
12+
<article className="page-layout max-w-824 z-5">
1413
<DetailHeader />
1514
<DetailTitle />
1615
<DetailContent />
1716
<section className="mb-10">
18-
<DetailComment />
19-
<CommentList />
17+
<Comment />
2018
</section>
2119
</article>
2220
<div className="hidden md:block">

src/app/community/loading.tsx

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
function loading() {
2+
return (
3+
<div className="w-full animate-pulse">
4+
<div className="page-layout max-w-[1024px]">
5+
<div className="md:mt-90 mt-60 mb-10 flex flex-col gap-8">
6+
{/* 탭 + 글쓰기 버튼 */}
7+
<section className="flex justify-between items-center sm:flex-row flex-col gap-4 mt-1">
8+
<div className="h-10 w-full sm:w-80 bg-gray rounded-md" /> {/* 탭 */}
9+
<div className="h-10 w-24 bg-gray rounded-md" /> {/* 버튼 */}
10+
</section>
11+
12+
{/* 필터 */}
13+
<div className="h-8 w-full bg-gray rounded-md" />
14+
15+
{/* 게시물 카드 스켈레톤 4개 */}
16+
{[...Array(4)].map((_, i) => (
17+
<div key={i} className="h-35 w-full bg-gray rounded-md" />
18+
))}
19+
</div>
20+
</div>
21+
</div>
22+
);
23+
}
24+
25+
export default loading;

src/app/community/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ import CommunityTab from '@/domains/community/main/CommunityTab';
33
import PostCard from '@/domains/community/main/PostCard';
44
import WriteBtn from '@/domains/community/main/WriteBtn';
55

6-
import PageHeader from '@/domains/shared/pageHeader/PageHeader';
6+
import PageHeader from '@/domains/shared/components/page-header/PageHeader';
77
import { Metadata } from 'next';
88

99
export const metadata: Metadata = {
10-
title: '커뮤니티',
10+
title: 'SSOUL | 커뮤니티',
1111
description: '칵테일에 관한 모든 이야기',
1212
};
1313

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
function loading() {
2+
return (
3+
<div className="w-full mb-20 flex relative animate-pulse">
4+
<div className="page-layout max-w-[824px] flex-1 z-5 space-y-6 mt-12">
5+
{/* CompleteBtn 자리 */}
6+
<div className="flex justify-end">
7+
<div className="h-10 w-26 bg-gray rounded-md" />
8+
</div>
9+
10+
<section className="space-y-4">
11+
{/* FormTitle 자리 */}
12+
<div className="h-13 w-full mt-10 bg-gray rounded-md" />
13+
{/* Category 자리 */}
14+
<div className="flex justify-end mt-10">
15+
<div className="h-10 w-full max-w-[110px] bg-gray rounded-md" />
16+
</div>
17+
{/* WriteForm 자리 (큰 박스) */}
18+
<div className="h-60 w-full bg-gray rounded-md" />
19+
</section>
20+
21+
{/* ImageSection 자리 */}
22+
<div className="h-36 w-full bg-gray rounded-md" />
23+
24+
<section className="mt-8">
25+
{/* Tag 자리 */}
26+
<div className="h-8 w-24 bg-gray rounded-md" />
27+
</section>
28+
</div>
29+
</div>
30+
);
31+
}
32+
33+
export default loading;

src/app/community/write/page.tsx

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,36 @@
1+
'use client';
2+
3+
import Tag from '@/domains/community/components/tag/Tag';
4+
import Category from '@/domains/community/write/Category';
5+
import TagModal from '@/domains/community/write/cocktail-tag/TagModal';
6+
import CompleteBtn from '@/domains/community/write/CompleteBtn';
7+
import FormTitle from '@/domains/community/write/FormTitle';
8+
import ImageSection from '@/domains/community/write/image-upload/ImageSection';
9+
import WriteForm from '@/domains/community/write/WriteForm';
10+
import StarBg from '@/domains/shared/components/star-bg/StarBg';
11+
import { useState } from 'react';
12+
113
function Page() {
2-
return <div className="page-layout max-w-824"></div>;
14+
const [isOpen, setIsOpen] = useState(false);
15+
16+
return (
17+
<div className="w-full mb-20 flex relative">
18+
<StarBg className="w-full h-32 absolute"></StarBg>
19+
<div className="page-layout max-w-824 flex-1 z-5">
20+
<CompleteBtn />
21+
<section>
22+
<FormTitle />
23+
<Category />
24+
<WriteForm />
25+
</section>
26+
<ImageSection />
27+
<section className="mt-8">
28+
<Tag use="write" onClick={() => setIsOpen(true)} />
29+
</section>
30+
</div>
31+
{isOpen && <TagModal isOpen={isOpen} setIsOpen={setIsOpen} />}
32+
</div>
33+
);
334
}
435

536
export default Page;

src/app/design-system/page.tsx

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,22 @@
22

33
import Button from '@/shared/components/button/Button';
44
import TextButton from '@/shared/components/button/TextButton';
5-
import Input from '@/shared/components/InputBox/Input';
5+
import Input from '@/shared/components/Input-box/Input';
66
import { useState } from 'react';
7-
import { customToast } from '@/shared/components/toast/CustomToastUtils';
8-
import ModalLayout from '@/shared/components/modalPop/ModalLayout';
9-
import SelectBox from '@/domains/shared/select-box/SelectBox';
7+
import ModalLayout from '@/shared/components/modal-pop/ModalLayout';
8+
import SelectBox from '@/domains/shared/components/select-box/SelectBox';
109

1110
import Spinner from '@/shared/components/spinner/Spinner';
1211
import LikeBtn from '@/domains/community/components/like/LikeBtn';
13-
import Share from '@/domains/shared/share/Share';
14-
import Keep from '@/domains/shared/keep/Keep';
15-
import ConfirmModal from '@/shared/components/modalPop/ConfirmModal';
12+
import Share from '@/domains/shared/components/share/Share';
13+
import Keep from '@/domains/shared/components/keep/Keep';
14+
import ConfirmModal from '@/shared/components/modal-pop/ConfirmModal';
15+
import { useToast } from '@/shared/hook/useToast';
1616

1717
function Page() {
1818
const [isModalOpen, setModalOpen] = useState(false);
1919
const [isConfirmOpen, setConfirmOpen] = useState(false);
20+
const { toastSuccess, toastInfo, toastError } = useToast();
2021

2122
return (
2223
<div className="p-6 space-y-6 bg-primary">
@@ -78,21 +79,21 @@ function Page() {
7879
<div className="flex gap-2">
7980
<button
8081
className="px-4 py-2 bg-green-300 text-black rounded"
81-
onClick={() => customToast.success('성공 메시지 \n 줄바꿈은 이렇게')}
82+
onClick={() => toastSuccess('성공 메시지 \n 줄바꿈은 이렇게')}
8283
>
8384
Success Toast
8485
</button>
8586

8687
<button
8788
className="px-4 py-2 bg-yellow-100 text-black rounded"
88-
onClick={() => customToast.info('정보 메시지')}
89+
onClick={() => toastInfo('정보 메시지')}
8990
>
9091
Info Toast
9192
</button>
9293

9394
<button
9495
className="px-4 py-2 bg-red-200 text-black rounded"
95-
onClick={() => customToast.error('오류 메시지')}
96+
onClick={() => toastError('오류 메시지')}
9697
>
9798
Error Toast
9899
</button>

0 commit comments

Comments
 (0)