Skip to content

Commit

Permalink
Revert "[#414] [프로필] 프로필 수정 페이지 (#426)"
Browse files Browse the repository at this point in the history
This reverts commit 91b8171.
  • Loading branch information
gxxrxn authored Aug 20, 2024
1 parent 4ef2403 commit 35d2f58
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 322 deletions.
5 changes: 1 addition & 4 deletions .storybook/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import React from 'react';
import type { Preview } from '@storybook/react';
import '@/styles/global.css';

import Layout from '../src/v1/layout/Layout';
import ToastProvider from '../src/ui/Base/Toast/ToastProvider';

const preview: Preview = {
Expand All @@ -23,9 +22,7 @@ const preview: Preview = {
decorators: [
Story => (
<ToastProvider>
<Layout>
<Story />
</Layout>
<Story />
</ToastProvider>
),
],
Expand Down
4 changes: 2 additions & 2 deletions public/icons/close.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
38 changes: 22 additions & 16 deletions src/app/profile/me/edit/page.tsx
Original file line number Diff line number Diff line change
@@ -1,25 +1,31 @@
'use client';

import { Suspense } from 'react';
import useAllJobQuery from '@/queries/job/useAllJobQuery';
import useMyProfileQuery from '@/queries/user/useMyProfileQuery';

import { isAuthed } from '@/utils/helpers';
import AuthRequired from '@/ui/AuthRequired';
import TopNavigation from '@/ui/common/TopNavigation';
import ProfileForm from '@/ui/Profile/ProfileForm';
import { isAuthed } from '@/utils/helpers';
import { Skeleton, VStack } from '@chakra-ui/react';
import { Suspense } from 'react';

import EditProfile from '@/v1/profile/EditProfile';

/**
* @todo
* Fallback UI 추가하기
*/

const EditProfilePage = () => {
const EditMyPage = () => {
return (
<AuthRequired>
<Suspense fallback={null}>
<Contents />
</Suspense>
<VStack justify="center" align="center">
<TopNavigation pageTitle="내 프로필 수정" />
<Suspense
fallback={
<VStack gap="2rem" align="stretch" w="100%">
<Skeleton w="100%" height="6rem" />
<Skeleton w="100%" height="6rem" />
<Skeleton w="100%" height="6rem" />
</VStack>
}
>
<Contents />
</Suspense>
</VStack>
</AuthRequired>
);
};
Expand All @@ -29,8 +35,8 @@ const Contents = () => {
const { data: profileData } = useMyProfileQuery();

return allJobQuery.isSuccess ? (
<EditProfile profile={profileData} jobGroups={allJobQuery.data.jobGroups} />
<ProfileForm profile={profileData} jobGroups={allJobQuery.data.jobGroups} />
) : null;
};

export default EditProfilePage;
export default EditMyPage;
5 changes: 1 addition & 4 deletions src/components/ContextProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import ChakraThemeProvider from '@/components/ChakraThemeProvider';
import ReactQueryProvider from '@/components/ReactQueryProvider';
import { ReactNode } from 'react';
import ErrorPage from '@/app/error';
import ToastProvider from '@/ui/Base/Toast/ToastProvider';

const ContextProvider = ({ children }: { children: ReactNode }) => {
return (
Expand All @@ -16,9 +15,7 @@ const ContextProvider = ({ children }: { children: ReactNode }) => {
<ReactQueryProvider>
<ChakraThemeProvider>
<ErrorBoundary fallbackRender={ErrorPage}>
<ToastProvider>
<Layout>{children}</Layout>
</ToastProvider>
<Layout>{children}</Layout>
</ErrorBoundary>
</ChakraThemeProvider>
</ReactQueryProvider>
Expand Down
76 changes: 0 additions & 76 deletions src/stories/Base/InputLength.stories.tsx

This file was deleted.

22 changes: 0 additions & 22 deletions src/ui/Base/InputLength.tsx

This file was deleted.

8 changes: 3 additions & 5 deletions src/ui/Base/TopNavigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const TopNavigation = ({ children }: TopNavigationProps) => {

const LeftItem = ({ children }: ItemProps) => {
return (
<div className="absolute left-[0rem] [&_svg]:h-[2rem] [&_svg]:w-[2rem] [&_svg]:cursor-pointer">
<div className="absolute left-[2rem] [&_svg]:h-[2rem] [&_svg]:w-[2rem] [&_svg]:cursor-pointer">
{children}
</div>
);
Expand All @@ -32,15 +32,13 @@ const textAligns = {
const CenterItem = ({ children, textAlign = 'center' }: CenterItemProps) => {
const alignClassName = textAligns[textAlign];
return (
<div className={`h-[2rem] w-full px-[1.5rem] ${alignClassName}`}>
{children}
</div>
<div className={`w-full px-[3.5rem] ${alignClassName}`}>{children}</div>
);
};

const RightItem = ({ children }: ItemProps) => {
return (
<div className="absolute right-[0rem] flex gap-[1rem] [&_svg]:h-[2rem] [&_svg]:w-[2rem] [&_svg]:cursor-pointer">
<div className="absolute right-[2rem] flex gap-[1rem] [&_svg]:h-[2rem] [&_svg]:w-[2rem] [&_svg]:cursor-pointer">
{children}
</div>
);
Expand Down
Loading

0 comments on commit 35d2f58

Please sign in to comment.