Skip to content

Commit 16df935

Browse files
authored
Merge branch 'develop' into refactor/change-onboarding
2 parents 4d2fa82 + 32194ac commit 16df935

Some content is hidden

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

60 files changed

+3595
-2214
lines changed

โ€Žnext.config.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
const nextConfig = {
33
images: {
44
// TODO: ์ถ”ํ›„ ์ œ๊ฑฐ
5-
domains: ['i.namu.wiki'],
5+
domains: ['i.namu.wiki', 'opengraph.githubassets.com'],
66
},
77
};
88

โ€Žpackage.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"dependencies": {
1717
"@hookform/resolvers": "^4.1.3",
1818
"@radix-ui/react-avatar": "^1.1.3",
19+
"@radix-ui/react-dialog": "^1.1.6",
1920
"@radix-ui/react-dropdown-menu": "^2.1.6",
2021
"@radix-ui/react-label": "^2.1.2",
2122
"@radix-ui/react-progress": "^1.1.2",
@@ -33,12 +34,13 @@
3334
"next-themes": "^0.4.4",
3435
"react": "^18",
3536
"react-dom": "^18",
36-
"react-intersection-observer": "^9.16.0",
3737
"react-hook-form": "^7.54.2",
38+
"react-intersection-observer": "^9.16.0",
3839
"react-select": "^5.10.1",
3940
"sonner": "^2.0.1",
4041
"swiper": "^11.2.4",
4142
"tailwind-merge": "^3.0.1",
43+
"tailwind-scrollbar-hide": "^2.0.0",
4244
"tailwindcss-animate": "^1.0.7",
4345
"ts-pattern": "^5.6.2",
4446
"zod": "^3.24.2",

โ€Žpnpm-lock.yaml

+1,626-2,078
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

โ€Žpublic/icons/delete.svg

+3
Loading

โ€Žpublic/icons/downArrow.svg

+3
Loading

โ€Žpublic/icons/edit.svg

+3
Loading

โ€Žpublic/icons/folderIcon.svg

+3
Loading

โ€Žpublic/icons/searchIcon.svg

+3
Loading
Loading
File renamed without changes.

โ€Žsrc/app/(create)/card-create/page.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ function Page() {
55
<>
66
<CardCreateView />
77
</>
8-
)
8+
);
99
}
10-
export default Page;
10+
export default Page;

โ€Žsrc/app/(detail)/card-detail/[cardId]/page.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import CardTabs from '@/features/card-detail/ui/cardTabs';
33

44
function Page() {
55
return (
6-
<div className="flex h-dvh w-full">
7-
<div className="mx-auto flex w-full max-w-[600px] flex-col items-center bg-gray-black">
6+
<div className="flex h-full min-h-dvh w-full">
7+
<div className="relative mx-auto flex w-full max-w-[600px] flex-col items-center bg-gray-black">
88
<CardDetailHeader />
99
<CardTabs />
1010
</div>
+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
'use client';
2+
3+
import React from 'react';
4+
5+
import ReceivedCardView from '@/features/received/ui';
6+
import Appbar from '@/shared/ui/appbar';
7+
import { Navbar } from '@/shared/ui/Navigation';
8+
9+
function Page() {
10+
return (
11+
<div className="flex h-dvh w-full justify-center">
12+
<div className="flex w-full max-w-[600px] flex-col bg-gray-black">
13+
<Appbar page="received" />
14+
<ReceivedCardView />
15+
<Navbar />
16+
</div>
17+
</div>
18+
);
19+
}
20+
21+
export default Page;

โ€Žsrc/app/api/auth/callback/[provider]/page.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ export default function SocialAuthCallbackPage({ params }: { params: { provider:
1919
try {
2020
const result = await handleSocialAuth(provider, code as string);
2121
if (result.success) {
22-
router.push('/');
22+
router.replace('/');
2323
}
2424
} catch (err) {
2525
console.error('์ธ์ฆ ์ฒ˜๋ฆฌ ์ค‘ ์˜ค๋ฅ˜:', err);
2626
}
2727
};
2828

2929
processAuth();
30-
}, []);
30+
}, [params.provider, searchParams, router]);
3131

32-
return <div>๋กœ๊ทธ์ธ ์ง„ํ–‰์ค‘..</div>;
32+
return null;
3333
}

โ€Žsrc/app/globals.css

+1
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@
6464
/* radius */
6565
--radius-sm: 8px;
6666
--radius-md: 12px;
67+
--radius-ml: 20px;
6768
--radius-lg: 80px;
6869

6970
.home-swiper .swiper-pagination-bullet {

โ€Žsrc/app/setting/alram/page.tsx

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { AlramView } from '@/features/setting';
2+
3+
export default function Page() {
4+
return <AlramView />;
5+
}

โ€Žsrc/app/setting/page.tsx

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { HeaderContainer } from '@/features/home/containers/HeaderContainer';
2+
import { SettingView } from '@/features/setting';
3+
import { cn } from '@/shared/lib/utils';
4+
import { spacingStyles } from '@/shared/spacing';
5+
import { Navbar } from '@/shared/ui/Navigation';
6+
7+
export default function SettingPage() {
8+
return (
9+
<div className="relative mx-auto h-dvh w-full max-w-[600px] justify-center">
10+
<HeaderContainer />
11+
<section className={cn(spacingStyles({ paddingY: 'md', paddingX: 'ml' }))}>
12+
<SettingView />
13+
</section>
14+
<footer>
15+
<Navbar />
16+
</footer>
17+
</div>
18+
);
19+
}
+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { UserQuitView } from '@/features/setting';
2+
3+
export default function UserQuitPage() {
4+
return <UserQuitView />;
5+
}

โ€Žsrc/features/auth/login/config/authConfig.ts

+8-9
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// config/authConfig.ts
22

33
import { SocialProvider } from '../types/auth';
4-
import { required, optional } from '../utils/envVaild';
4+
import { optional, required } from '../utils/envVaild';
55

66
/**
77
* ์ธ์ฆ ๊ด€๋ จ ๊ธฐ๋ณธ URL ์„ค์ •
@@ -34,10 +34,10 @@ export const providerEnvConfig = {
3434
},
3535
// ํ˜„์žฌ ์นด์นด์˜ค๋กœ ์ž„์‹œ ์„ค์ •
3636
APPLE: {
37-
restApiKey: required('NEXT_PUBLIC_KAKAO_REST_API_KEY', process.env.NEXT_PUBLIC_KAKAO_REST_API_KEY),
37+
restApiKey: required('NEXT_PUBLIC_APPLE', process.env.NEXT_PUBLIC_APPLE_CLIENT_ID),
3838
redirectUrl: isProd
39-
? required('NEXT_PUBLIC_KAKAO_REDIRECT_URI', process.env.NEXT_PUBLIC_KAKAO_REDIRECT_URI)
40-
: required('NEXT_PUBLIC_KAKAO_REDIRECT_URI_LOCAL', process.env.NEXT_PUBLIC_KAKAO_REDIRECT_URI_LOCAL),
39+
? required('NEXT_PUBLIC_APPLE_REDIRECT_URI', process.env.NEXT_PUBLIC_APPLE_REDIRECT_URI)
40+
: required('NEXT_PUBLIC_APPLE_REDIRECT_URI_LOCAL', process.env.NEXT_PUBLIC_APPLE_REDIRECT_URI_LOCAL),
4141
scope: optional(''),
4242
},
4343
};
@@ -53,7 +53,7 @@ export const getRedirectUrl = (provider: SocialProvider): string => {
5353
return providerEnvConfig.GOOGLE.redirectUrl;
5454
// ํ˜„์žฌ ์นด์นด์˜ค๋กœ ์ž„์‹œ ์„ค์ •
5555
case 'APPLE':
56-
return providerEnvConfig.KAKAO.redirectUrl;
56+
return providerEnvConfig.APPLE.redirectUrl;
5757
default:
5858
return '';
5959
}
@@ -81,10 +81,9 @@ export const getAuthUrl = {
8181

8282
// ํ˜„์žฌ ์นด์นด์˜ค๋กœ ์ž„์‹œ ์„ค์ •
8383
APPLE: () => {
84-
const { restApiKey } = providerEnvConfig.KAKAO;
85-
const redirectUrl = getRedirectUrl('KAKAO');
86-
const scope = providerEnvConfig.KAKAO.scope;
84+
const { restApiKey } = providerEnvConfig.APPLE;
85+
const redirectUrl = getRedirectUrl('APPLE');
8786

88-
return `${AUTH_BASE_URLS.KAKAO}?client_id=${restApiKey}&redirect_uri=${redirectUrl}&response_type=code&scope=${scope}`;
87+
return `${AUTH_BASE_URLS.APPLE}?client_id=${restApiKey}&redirect_uri=${redirectUrl}&response_type=code&scope=name+email&response_mode=form_post`;
8988
},
9089
};

โ€Žsrc/features/card-detail/hooks/query/useCardDetailQuery.ts

+18-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
// api/cardQueries.ts
22
import { useQuery } from '@tanstack/react-query';
33

4+
import { MyCardDto } from '@/features/home/types';
45
import { client } from '@/shared/apis/client';
56
import { CLIENT_SIDE_URL } from '@/shared/constants';
67

7-
import { mockCardDetailData } from '../../mocks/sample';
8+
import { mockCardDetailData } from '../../mocks/myCardDetail';
89
import { CardDetailDto } from '../../types/cardDetail';
910

1011
// API ํ˜ธ์ถœ ํ•จ์ˆ˜
@@ -13,6 +14,12 @@ const getCardDetail = async (cardId: number): Promise<CardDetailDto> => {
1314
return data;
1415
};
1516

17+
// ๋‚ด ๋ช…ํ•จ ๋ชฉ๋ก ์กฐํšŒ
18+
const getMyCard = async (): Promise<MyCardDto> => {
19+
const data = await client.get<MyCardDto>(`${CLIENT_SIDE_URL}/api/card/my`);
20+
return data;
21+
};
22+
1623
// ์นด๋“œ ์ƒ์„ธ ์ •๋ณด๋ฅผ ๊ฐ€์ ธ์˜ค๋Š” ์ฟผ๋ฆฌ ํ›…
1724
export const useCardDetailQuery = (cardId: number) => {
1825
const { data: _ } = useQuery({
@@ -22,3 +29,13 @@ export const useCardDetailQuery = (cardId: number) => {
2229

2330
return { data: mockCardDetailData };
2431
};
32+
33+
// ๋‚ด ๋ช…ํ•จ ๋ชฉ๋ก ์กฐํšŒ
34+
export const useMyCardQuery = () => {
35+
const data = useQuery({
36+
queryKey: ['myCard'],
37+
queryFn: () => getMyCard(),
38+
});
39+
40+
return data;
41+
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
'use client';
2+
3+
import { useState } from 'react';
4+
5+
export const useBottomModal = () => {
6+
const [isModalOpen, setIsModalOpen] = useState(false);
7+
8+
// ํ—ค๋” ๋ฉ”๋‰ด ํด๋ฆญ์‹œ ํ•จ์ˆ˜
9+
const headerRightHandler = () => {
10+
setIsModalOpen(true);
11+
};
12+
13+
// ๋ชจ๋‹ฌ ๋‹ซ๊ธฐ ํ•จ์ˆ˜
14+
const closeModal = () => {
15+
setIsModalOpen(false);
16+
};
17+
18+
return { isModalOpen, setIsModalOpen, headerRightHandler, closeModal };
19+
};

โ€Žsrc/features/card-detail/mocks/sample.ts โ€Žsrc/features/card-detail/mocks/myCardDetail.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,13 @@ export const mockCardDetailData: CardDetailDto = {
88
timestamp: '2025-03-10T08:03:28.800Z',
99
data: {
1010
nickname: '์ด์žฌ์ธ',
11-
job: 'DEVELOPER',
11+
job: 'DESIGNER',
1212
detailJob: 'Frontend Developer',
1313
organization: '๋””ํ”„๋งŒ',
1414
summary: '์‚ฌ์šฉ์ž ๊ฒฝํ—˜์„ ์ค‘์š”์‹œํ•˜๋Š” ํ”„๋ก ํŠธ์—”๋“œ ๊ฐœ๋ฐœ์ž์ž…๋‹ˆ๋‹ค. ',
1515
region: '๊ฒŒ๋”',
16+
group: ['๋””ํ”„๋งŒ', '์—˜๋ฆฌ์Šค๋žฉ'],
17+
introduce: '๋””ํ”„๋งŒ web 16๊ธฐ ์œค์žฅ์›์ž…๋‹ˆ๋‹ค!',
1618
interestDomain: ['์›น ๊ฐœ๋ฐœ', 'UI/UX', 'ํ”„๋ก ํŠธ์—”๋“œ', 'React'],
1719
sns: [
1820
{

โ€Žsrc/features/card-detail/types/cardDetail.ts

+2
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ export type CardDetailResponse = {
3636
organization: string;
3737
summary: string;
3838
region: string;
39+
group?: string[];
40+
introduce?: string;
3941
interestDomain?: string[] | undefined;
4042
sns?: SnsDto[] | undefined;
4143
news?: string | undefined;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
// API ์‘๋‹ต ๊ธฐ๋ณธ ๊ตฌ์กฐ
2+
export type ApiResponse<T> = {
3+
status: string;
4+
message: string;
5+
timestamp: string;
6+
data: T;
7+
};
8+
9+
// SNS ํƒ€์ž…
10+
export type SnsDto = {
11+
type: string;
12+
link: string;
13+
};
14+
15+
// ์ฝ˜ํ…์ธ  ์•„์ดํ…œ (๋ธ”๋กœ๊ทธ ํฌ์ŠคํŠธ ๋“ฑ) ํƒ€์ž…
16+
export type ContentItemDto = {
17+
title: string;
18+
link: string;
19+
imageUrl: string;
20+
description: string;
21+
};
22+
23+
// ํ”„๋กœ์ ํŠธ ํƒ€์ž…
24+
export type ProjectDto = {
25+
title: string;
26+
link: string;
27+
imageUrl: string;
28+
description: string;
29+
};
30+
31+
// ๋ฏธ๋ฆฌ๋ณด๊ธฐ ์ •๋ณด ํƒ€์ž…
32+
export type PreviewInfoType = 'PROJECT' | 'CONTENT' | 'HOBBY' | 'SNS' | 'NEWS' | 'REGION';
33+
34+
// ๋ฏธ๋ฆฌ๋ณด๊ธฐ ์ •๋ณด ๊ตฌ์กฐ
35+
export type PreviewInfo = {
36+
project?: ProjectDto;
37+
content?: ContentItemDto;
38+
hobby?: string;
39+
sns?: SnsDto;
40+
news?: string;
41+
region?: string;
42+
};
43+
44+
// ์นด๋“œ ๊ธฐ๋ณธ ์ •๋ณด ํƒ€์ž…
45+
export type CardInfo = {
46+
id: number;
47+
nickname: string;
48+
organization: string;
49+
job: string;
50+
detailJob: string;
51+
summary: string;
52+
interestDomain?: string[];
53+
previewInfoType: PreviewInfoType;
54+
previewInfo: PreviewInfo;
55+
imagePath: string;
56+
};
57+
58+
// ๋‚ด ์นด๋“œ ์‘๋‹ต ํƒ€์ž…
59+
export type MyCardResponse = {
60+
cards: CardInfo[];
61+
};
62+
63+
// ๋‚ด ์นด๋“œ DTO ํƒ€์ž…
64+
export type MyCardDto = ApiResponse<MyCardResponse>;

0 commit comments

Comments
ย (0)