Skip to content

Commit 35d2f58

Browse files
authored
Revert "[#414] [프로필] 프로필 수정 페이지 (#426)"
This reverts commit 91b8171.
1 parent 4ef2403 commit 35d2f58

File tree

8 files changed

+29
-322
lines changed

8 files changed

+29
-322
lines changed

.storybook/preview.tsx

+1-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import React from 'react';
33
import type { Preview } from '@storybook/react';
44
import '@/styles/global.css';
55

6-
import Layout from '../src/v1/layout/Layout';
76
import ToastProvider from '../src/ui/Base/Toast/ToastProvider';
87

98
const preview: Preview = {
@@ -23,9 +22,7 @@ const preview: Preview = {
2322
decorators: [
2423
Story => (
2524
<ToastProvider>
26-
<Layout>
27-
<Story />
28-
</Layout>
25+
<Story />
2926
</ToastProvider>
3027
),
3128
],

public/icons/close.svg

+2-2
Loading

src/app/profile/me/edit/page.tsx

+22-16
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,31 @@
11
'use client';
22

3-
import { Suspense } from 'react';
43
import useAllJobQuery from '@/queries/job/useAllJobQuery';
54
import useMyProfileQuery from '@/queries/user/useMyProfileQuery';
6-
7-
import { isAuthed } from '@/utils/helpers';
85
import AuthRequired from '@/ui/AuthRequired';
6+
import TopNavigation from '@/ui/common/TopNavigation';
7+
import ProfileForm from '@/ui/Profile/ProfileForm';
8+
import { isAuthed } from '@/utils/helpers';
9+
import { Skeleton, VStack } from '@chakra-ui/react';
10+
import { Suspense } from 'react';
911

10-
import EditProfile from '@/v1/profile/EditProfile';
11-
12-
/**
13-
* @todo
14-
* Fallback UI 추가하기
15-
*/
16-
17-
const EditProfilePage = () => {
12+
const EditMyPage = () => {
1813
return (
1914
<AuthRequired>
20-
<Suspense fallback={null}>
21-
<Contents />
22-
</Suspense>
15+
<VStack justify="center" align="center">
16+
<TopNavigation pageTitle="내 프로필 수정" />
17+
<Suspense
18+
fallback={
19+
<VStack gap="2rem" align="stretch" w="100%">
20+
<Skeleton w="100%" height="6rem" />
21+
<Skeleton w="100%" height="6rem" />
22+
<Skeleton w="100%" height="6rem" />
23+
</VStack>
24+
}
25+
>
26+
<Contents />
27+
</Suspense>
28+
</VStack>
2329
</AuthRequired>
2430
);
2531
};
@@ -29,8 +35,8 @@ const Contents = () => {
2935
const { data: profileData } = useMyProfileQuery();
3036

3137
return allJobQuery.isSuccess ? (
32-
<EditProfile profile={profileData} jobGroups={allJobQuery.data.jobGroups} />
38+
<ProfileForm profile={profileData} jobGroups={allJobQuery.data.jobGroups} />
3339
) : null;
3440
};
3541

36-
export default EditProfilePage;
42+
export default EditMyPage;

src/components/ContextProvider.tsx

+1-4
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import ChakraThemeProvider from '@/components/ChakraThemeProvider';
77
import ReactQueryProvider from '@/components/ReactQueryProvider';
88
import { ReactNode } from 'react';
99
import ErrorPage from '@/app/error';
10-
import ToastProvider from '@/ui/Base/Toast/ToastProvider';
1110

1211
const ContextProvider = ({ children }: { children: ReactNode }) => {
1312
return (
@@ -16,9 +15,7 @@ const ContextProvider = ({ children }: { children: ReactNode }) => {
1615
<ReactQueryProvider>
1716
<ChakraThemeProvider>
1817
<ErrorBoundary fallbackRender={ErrorPage}>
19-
<ToastProvider>
20-
<Layout>{children}</Layout>
21-
</ToastProvider>
18+
<Layout>{children}</Layout>
2219
</ErrorBoundary>
2320
</ChakraThemeProvider>
2421
</ReactQueryProvider>

src/stories/Base/InputLength.stories.tsx

-76
This file was deleted.

src/ui/Base/InputLength.tsx

-22
This file was deleted.

src/ui/Base/TopNavigation.tsx

+3-5
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const TopNavigation = ({ children }: TopNavigationProps) => {
1616

1717
const LeftItem = ({ children }: ItemProps) => {
1818
return (
19-
<div className="absolute left-[0rem] [&_svg]:h-[2rem] [&_svg]:w-[2rem] [&_svg]:cursor-pointer">
19+
<div className="absolute left-[2rem] [&_svg]:h-[2rem] [&_svg]:w-[2rem] [&_svg]:cursor-pointer">
2020
{children}
2121
</div>
2222
);
@@ -32,15 +32,13 @@ const textAligns = {
3232
const CenterItem = ({ children, textAlign = 'center' }: CenterItemProps) => {
3333
const alignClassName = textAligns[textAlign];
3434
return (
35-
<div className={`h-[2rem] w-full px-[1.5rem] ${alignClassName}`}>
36-
{children}
37-
</div>
35+
<div className={`w-full px-[3.5rem] ${alignClassName}`}>{children}</div>
3836
);
3937
};
4038

4139
const RightItem = ({ children }: ItemProps) => {
4240
return (
43-
<div className="absolute right-[0rem] flex gap-[1rem] [&_svg]:h-[2rem] [&_svg]:w-[2rem] [&_svg]:cursor-pointer">
41+
<div className="absolute right-[2rem] flex gap-[1rem] [&_svg]:h-[2rem] [&_svg]:w-[2rem] [&_svg]:cursor-pointer">
4442
{children}
4543
</div>
4644
);

0 commit comments

Comments
 (0)