diff --git a/next.config.js b/next.config.js index 23e31f7f..1d7d5694 100644 --- a/next.config.js +++ b/next.config.js @@ -1,9 +1,9 @@ 9; /** @type {import('next').NextConfig} */ const nextConfig = { + pageExtensions: ['page.tsx', 'page.ts', 'api.tsx', 'api.ts'], experimental: { - instrumentationHooks: true, - serverActions: true, + appDir: false, }, images: { remotePatterns: [ diff --git a/panda.config.ts b/panda.config.ts index 194f6666..cafb5248 100644 --- a/panda.config.ts +++ b/panda.config.ts @@ -9,7 +9,7 @@ export default defineConfig({ preflight: true, jsxFramework: 'react', // Where to look for your css declarations - include: ['./src/**/*.{js,jsx,ts,tsx}', './src/app/**/*.{ts,tsx,js,jsx}', './stories/**/*.{js,jsx,ts,tsx}'], + include: ['./src/**/*.{js,jsx,ts,tsx}', './src/pages/**/*.{ts,tsx,js,jsx}', './stories/**/*.{js,jsx,ts,tsx}'], // Files to exclude exclude: [], diff --git a/src/apis/mission.ts b/src/apis/mission.ts index a9a17c46..88fd32ac 100644 --- a/src/apis/mission.ts +++ b/src/apis/mission.ts @@ -110,6 +110,7 @@ export const useGetMissionDetail = (missionId: string, option?: UseQueryOptions< return useSuspenseQuery({ queryKey: getQueryKey('missionDetail', { missionId }), queryFn: () => MISSION_APIS.getMissionDetail(missionId), + enabled: Boolean(missionId), ...option, }); }; diff --git a/src/app/LogoIcon.tsx b/src/app/LogoIcon.tsx deleted file mode 100644 index ccfdc1a6..00000000 --- a/src/app/LogoIcon.tsx +++ /dev/null @@ -1,54 +0,0 @@ -// TODO : Icon 컴포넌트로 변경 -const LogoIcon = () => { - return ( - - - - - - - - - - - - - - - - - - - - - - - - - - ); -}; - -export default LogoIcon; diff --git a/src/app/auth/login/layout.tsx b/src/app/auth/login/layout.tsx deleted file mode 100644 index 75b45b1e..00000000 --- a/src/app/auth/login/layout.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import React, { type PropsWithChildren } from 'react'; -import { type Metadata } from 'next'; - -export const metadata: Metadata = { - other: { - 'appleid-signin-scope': 'email', - 'appleid-signin-state': 'state', - 'appleid-signin-use-popup': 'true', - 'appleid-signin-client-id': process.env.NEXT_PUBLIC_APPLE_LOGIN_CLIENT_ID ?? '', - 'appleid-signin-nonce': process.env.NEXT_PUBLIC_SNS_LOGIN_NONCE ?? '', - 'appleid-signin-redirect-uri': process.env.NEXT_PUBLIC_APPLE_LOGIN_REDIRECT_URI ?? '', - }, -}; - -function LoginLayout({ children }: PropsWithChildren) { - return
{children}
; -} - -export default LoginLayout; diff --git a/src/app/global-error.tsx b/src/app/global-error.tsx deleted file mode 100644 index 65a6646e..00000000 --- a/src/app/global-error.tsx +++ /dev/null @@ -1,88 +0,0 @@ -'use client'; - -import { useEffect } from 'react'; -import Image from 'next/image'; -import { useRouter } from 'next/navigation'; -import { isSeverError } from '@/apis/instance.api'; -import { ROUTER } from '@/constants/router'; -import { css } from '@/styled-system/css'; - -export default function Error({ error, reset }: { error: Error & { digest?: string }; reset: () => void }) { - const onClickResetButton = () => reset(); - const router = useRouter(); - useEffect(() => { - if (isSeverError(error)) { - if (error.response.status === 401) { - router.push(ROUTER.AUTH.LOGIN); - } - } - console.error(error); - }, [error]); - - return ( - - -
-
- {'crying-face'} -
-
-
시스템에 문제가 생겼어요.
-

- 에러가 발생해 페이지를 로딩할 수 없어요. -
- 이전 페이지로 돌아가 주세요. -

-
- -
- - - ); -} - -const MainWrapperCss = css({ - display: 'flex', - flexDirection: 'column', - alignItems: 'center', - justifyContent: 'center', - - width: '100%', - height: '100vh', - padding: '118px 16px 50px 16px', -}); - -const imageWrapperCss = css({ - marginBottom: '18px', -}); - -const titleWrapperCss = css({ - display: 'flex', - gap: '6px', - flexDirection: 'column', - alignItems: 'center', - marginBottom: '60px', -}); - -const titleCss = css({ - textStyle: 'subtitle2', - color: 'text.primary', -}); - -const subTitleCss = css({ - textStyle: 'body5', - color: 'gray.gray600', - textAlign: 'center', -}); - -const resetButtonCss = css({ - color: 'text.secondary', - textStyle: 'subtitle4', - backgroundColor: 'gray.gray200', - width: '177px', - height: '44px', - padding: '12px 20px', - borderRadius: '16px', -}); diff --git a/src/app/layout.tsx b/src/app/layout.tsx deleted file mode 100644 index 900959f8..00000000 --- a/src/app/layout.tsx +++ /dev/null @@ -1,69 +0,0 @@ -import { Suspense } from 'react'; -import type { Metadata } from 'next'; -import MonitoringInitializer from '@/components/MonitoringInitializer'; -import NotificationSnackBarProvider from '@/components/NotificationSnackBar/NotificationSnackBarProvider'; -import SnackBarProvider from '@/components/SnackBar/SnackBarProvider'; -import { MSWInitComponent } from '@/msw'; -import { css } from '@/styled-system/css'; - -import { QueryProvider } from '../hooks/query'; - -import './globals.css'; - -export const metadata: Metadata = { - title: '10MM', - description: '10MM', - keywords: '10mm, 10분만, 10분, 10MM, 10mm, 하루 10분, 10분 단위, 생환습관', - openGraph: { - type: 'website', - url: 'https://www.10mm.today', - title: '10MM', - description: '당신의 인생을 바꿀 10분', - siteName: '10MM', - images: [ - { - url: 'https://www.10mm.today/og-image.png', - }, - ], - }, - viewport: 'width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0', -}; - -export default function RootLayout({ children }: { children: React.ReactNode }) { - return ( - - - - - - - - - - - -
{children}
-
-
-
-
- - - ); -} - -const containerCss = { - maxWidth: 'maxWidth', - margin: '0 auto', - minHeight: '100vh', - backgroundColor: 'bg.surface2', -}; - -const bodyCss = { - backgroundColor: 'bg.surface3', -}; diff --git a/src/app/level/guide/layout.tsx b/src/app/level/guide/layout.tsx deleted file mode 100644 index 6e95a2d2..00000000 --- a/src/app/level/guide/layout.tsx +++ /dev/null @@ -1,18 +0,0 @@ -import { type PropsWithChildren } from 'react'; -import Header from '@/components/Header/Header'; -import { css } from '@/styled-system/css'; - -function LevelGuideLayout({ children }: PropsWithChildren) { - return ( - <> -
-
{children}
- - ); -} - -export default LevelGuideLayout; - -const containerCss = css({ - minHeight: '720px', -}); diff --git a/src/app/mission/[id]/detail/layout.tsx b/src/app/mission/[id]/detail/layout.tsx deleted file mode 100644 index 67819a7d..00000000 --- a/src/app/mission/[id]/detail/layout.tsx +++ /dev/null @@ -1,15 +0,0 @@ -import { type PropsWithChildren } from 'react'; -import { css } from '@styled-system/css'; - -export default function Layout({ children }: PropsWithChildren) { - return
{children}
; -} - -const containerCss = css({ - maxWidth: 'maxWidth', - margin: '0 auto', - minHeight: '100vh', - - display: 'flex', - flexDirection: 'column', -}); diff --git a/src/app/mission/[id]/detail/modify/MissionModify.tsx b/src/app/mission/[id]/detail/modify/MissionModify.tsx deleted file mode 100644 index 31e6526e..00000000 --- a/src/app/mission/[id]/detail/modify/MissionModify.tsx +++ /dev/null @@ -1,51 +0,0 @@ -'use client'; - -import { useState } from 'react'; -import Input from '@/components/Input/Input'; -import { type DropdownValueType } from '@/components/Input/Input.types'; -import { PUBLIC_SETTING_LIST } from '@/constants/mission'; - -export default function MissionModify() { - const [missionTitleInput, setMissionTitleInput] = useState(''); - const [missionContentInput, setMissionContentInput] = useState(''); - - const [missionPublicSetting, setMissionPublicSetting] = useState(PUBLIC_SETTING_LIST[0]); - - const handleMissionTitleInput = (value: string) => { - setMissionTitleInput(value); - }; - - const handleMissionContentInput = (value: string) => { - setMissionContentInput(value); - }; - - return ( -
- - - - setMissionPublicSetting(item)} - /> -
- ); -} diff --git a/src/app/mission/[id]/stopwatch/layout.tsx b/src/app/mission/[id]/stopwatch/layout.tsx deleted file mode 100644 index 8acbf77f..00000000 --- a/src/app/mission/[id]/stopwatch/layout.tsx +++ /dev/null @@ -1,11 +0,0 @@ -import { type PropsWithChildren } from 'react'; -import { css } from '@/styled-system/css'; - -export default function Layout({ children }: PropsWithChildren) { - return
{children}
; -} - -const containerCss = css({ - minHeight: '100vh', - backgroundColor: 'bg.surface2', -}); diff --git a/src/app/mission/[id]/stopwatch/page.tsx b/src/app/mission/[id]/stopwatch/page.tsx deleted file mode 100644 index 773bcb42..00000000 --- a/src/app/mission/[id]/stopwatch/page.tsx +++ /dev/null @@ -1,28 +0,0 @@ -'use client'; - -import { useParams } from 'next/navigation'; -import { useGetMissionDetailNoSuspense } from '@/apis/mission'; - -import ButtonSection from './ButtonSection'; -import StopwatchHeader from './Header'; -import StopwatchProvider from './Stopwatch.context'; -import StopwatchSection from './StopwatchSection'; -import TextSection from './TextSection'; - -export default function StopwatchPage() { - const params = useParams(); - const missionId = params.id as string; - - const { data: missionData } = useGetMissionDetailNoSuspense(missionId); - // const category = missionData?.category ? MISSION_CATEGORY_LABEL[missionData?.category].label : ''; - const missionName = missionData?.name ?? ''; - - return ( - - - - - - - ); -} diff --git a/src/app/mission/new/layout.tsx b/src/app/mission/new/layout.tsx deleted file mode 100644 index 4a6cca1c..00000000 --- a/src/app/mission/new/layout.tsx +++ /dev/null @@ -1,16 +0,0 @@ -import { type PropsWithChildren } from 'react'; -import { css } from '@styled-system/css'; - -export default function Layout({ children }: PropsWithChildren) { - return
{children}
; -} - -const containerCss = css({ - maxWidth: 'maxWidth', - margin: '0 auto', - minHeight: '100vh', - - display: 'flex', - flexDirection: 'column', - flex: 1, -}); diff --git a/src/app/mission/new/page.tsx b/src/app/mission/new/page.tsx deleted file mode 100644 index ef174536..00000000 --- a/src/app/mission/new/page.tsx +++ /dev/null @@ -1,149 +0,0 @@ -'use client'; - -import { useState } from 'react'; -import { type MissionCategory, type MissionVisibility } from '@/apis/schema/mission'; -import useCreateMissionMutation from '@/app/mission/new/useCreateMissionMutation'; -import Header from '@/components/Header/Header'; -import Input from '@/components/Input/Input'; -import { type DropdownValueType } from '@/components/Input/Input.types'; -import { useSnackBar } from '@/components/SnackBar/SnackBarProvider'; -import { MISSION_CATEGORY_LIST, PUBLIC_SETTING_LIST } from '@/constants/mission'; -import { flex } from '@/styled-system/patterns'; -import { css } from '@styled-system/css'; - -export default function MissionNewPage() { - const { triggerSnackBar } = useSnackBar(); - - const [missionTitleInput, setMissionTitleInput] = useState(''); - const [missionContentInput, setMissionContentInput] = useState(''); - const [missionCategory, setMissionCategory] = useState | null>(null); - // eslint-disable-next-line @typescript-eslint/no-unused-vars - const [missionPublicSetting, setMissionPublicSetting] = useState>( - PUBLIC_SETTING_LIST[1], - ); - - const isSubmitButtonDisabled = !missionTitleInput || !missionCategory; - - const { mutate } = useCreateMissionMutation(); - // 미션 명 - const handleMissionTitleInput = (value: string) => { - setMissionTitleInput(value); - }; - // 미션 내용 - const handleMissionContentInput = (value: string) => { - setMissionContentInput(value); - }; - - const handleSubmit = () => { - if (!missionCategory) { - triggerSnackBar({ - message: '미션 제목을 입력해주세요.', - }); - return; - } - - mutate({ - name: missionTitleInput, - content: missionContentInput, - category: missionCategory.value, - visibility: missionPublicSetting.value, - }); - }; - return ( -
-
-
-

- 하루 10분씩 2주 동안 -
- 어떤 일에 투자하고 싶은가요? -

-
- - - - {/* 카테고리 */} - setMissionCategory(item)} - /> - {/* TODO: 이후에 삭제 - 미션 기간, 알림 설정 Input 생기며 리스트 여백 수정 */} -
- - {/* 공개설정 */} - setMissionPublicSetting(item)} - /> -
-
-
- ); -} - -const mainWrapperCss = css({ - flex: 1, - display: 'flex', - flexDirection: 'column', - - width: '100%', -}); - -const containerCss = css({ - display: 'flex', - flexDirection: 'column', - flex: 1, - - padding: '24px 16px', -}); - -const mainTitleCss = css({ - marginTop: '2px', - marginBottom: '36px', - - textStyle: 'title2', - - color: 'text.primary', - '& strong': { - color: 'purple.purple800', - textStyle: 'title2', - }, -}); - -const sectionCss = flex({ - flexDirection: 'column', - gap: '12px', -}); diff --git a/src/app/mission/new/useCreateMissionMutation.ts b/src/app/mission/new/useCreateMissionMutation.ts deleted file mode 100644 index 37f14fa2..00000000 --- a/src/app/mission/new/useCreateMissionMutation.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { useRouter } from 'next/navigation'; -import APIS from '@/apis'; -import { isSeverError } from '@/apis/instance.api'; -import { useSnackBar } from '@/components/SnackBar/SnackBarProvider'; -import { ROUTER } from '@/constants/router'; -import { useMutation } from '@tanstack/react-query'; - -const useCreateMissionMutation = () => { - const router = useRouter(); - const { triggerSnackBar } = useSnackBar(); - - return useMutation({ - mutationFn: APIS.createMission, - onSuccess: () => { - router.replace(ROUTER.HOME); - }, - onError: (error) => { - console.error('error: ', error); - if (isSeverError(error)) { - triggerSnackBar({ - message: error.response.data.data.message, - }); - return; - } - }, - }); -}; - -export default useCreateMissionMutation; diff --git a/src/app/mypage/Profile.tsx b/src/app/mypage/Profile.tsx deleted file mode 100644 index 473ba2a8..00000000 --- a/src/app/mypage/Profile.tsx +++ /dev/null @@ -1,13 +0,0 @@ -'use client'; - -import { useGetMembersMe } from '@/apis/member'; -import ProfileContent from '@/app/mypage/ProfileContent'; - -function Profile() { - const { data } = useGetMembersMe(); - if (!data) return ; - const { nickname, profileImageUrl } = data; - return ; -} - -export default Profile; diff --git a/src/app/mypage/ProfileContent.tsx b/src/app/mypage/ProfileContent.tsx deleted file mode 100644 index 5ca758d7..00000000 --- a/src/app/mypage/ProfileContent.tsx +++ /dev/null @@ -1,50 +0,0 @@ -import Link from 'next/link'; -import Icon from '@/components/Icon'; -import Thumbnail from '@/components/Thumbnail/Thumbnail'; -import { ROUTER } from '@/constants/router'; -import { css } from '@/styled-system/css'; -import { flex } from '@/styled-system/patterns'; - -function ProfileContent({ nickname, profileUrl }: { nickname: string; profileUrl?: string }) { - return ( -
- -
- -

{nickname}

- -
- -
- ); -} - -export default ProfileContent; - -const containerCss = flex({ - margin: '16px', - padding: '12px', - flexDirection: 'column', - gap: '14px', - borderRadius: '22px', - boxShadow: '0px 5px 50px 4px rgba(92, 78, 122, 0.50) inset, 0px 4px 20px 0px rgba(16, 15, 23, 0.20)', - background: 'linear-gradient(93deg, rgba(25, 23, 27, 0.80) 0.82%, rgba(24, 25, 33, 0.80) 99.97%)', - backdropFilter: 'blur(20px)', -}); - -const profileWrapperCss = flex({ - gap: '10px', - alignItems: 'center', -}); - -const nicknameCss = css({ - textStyle: 'subtitle2', - color: 'text.primary', - flex: 1, - - // 한줄 말줄임 처리 - textOverflow: 'ellipsis', - overflow: 'hidden', - minWidth: '0', - whiteSpace: 'nowrap', -}); diff --git a/src/app/mypage/VersionInfo.tsx b/src/app/mypage/VersionInfo.tsx deleted file mode 100644 index eba25813..00000000 --- a/src/app/mypage/VersionInfo.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import { css } from '@/styled-system/css'; - -const VERSION = '1.0'; -function VersionInfo() { - return
버전 정보 {VERSION}
; -} - -export default VersionInfo; - -const containerCss = css({ - position: 'fixed', - bottom: '130px', - left: 0, - right: 0, - margin: '0 auto', - width: 'fit-content', - textStyle: 'body5', - color: 'text.tertiary', -}); diff --git a/src/app/mypage/complete_mission/layout.tsx b/src/app/mypage/complete_mission/layout.tsx deleted file mode 100644 index 6ffccf1f..00000000 --- a/src/app/mypage/complete_mission/layout.tsx +++ /dev/null @@ -1,18 +0,0 @@ -import React, { type PropsWithChildren } from 'react'; -import Header from '@/components/Header/Header'; -import { css } from '@/styled-system/css'; - -function CompleteMissionLayout({ children }: PropsWithChildren) { - return ( - <> -
-
{children}
- - ); -} - -export default CompleteMissionLayout; - -const mainCss = css({ - padding: '16px', -}); diff --git a/src/app/mypage/complete_mission/page.tsx b/src/app/mypage/complete_mission/page.tsx deleted file mode 100644 index 570db2f9..00000000 --- a/src/app/mypage/complete_mission/page.tsx +++ /dev/null @@ -1,46 +0,0 @@ -import { TwoLineListItem } from '@/components/ListItem'; -import { flex } from '@/styled-system/patterns'; - -function CompleteMissionPage() { - return ( -
- {DUMMY_MISSION_LIST.map((item) => ( - - ))} -
- ); -} - -export default CompleteMissionPage; - -const containerCss = flex({ - flexDirection: 'column', - gap: '8px', -}); - -const DUMMY_MISSION_LIST = [ - { - imageUrl: '/images/category/writing.png', - category: - '글쓰기일이삼사오육칠팔구십일이삼사오육칠팔구십일일이삼사오육칠팔구십일이삼사오육칠팔구십일일이삼사오육칠팔구십일이삼사오육칠팔구십일', - missionTitle: - '오늘 하루 감사일기 쓰기 일이삼사오육칠팔구십일이삼사오육칠팔구십일일이삼사오육칠팔구십일이삼사오육칠팔구십일일이삼사오육칠팔구십일이삼사오육칠팔구십일', - status: 'NONE', - }, - { - imageUrl: '/images/category/etc.png', - category: - '글쓰기일이삼사오육칠팔구십일이삼사오육칠팔구십일일이삼사오육칠팔구십일이삼사오육칠팔구십일일이삼사오육칠팔구십일이삼사오육칠팔구십일', - missionTitle: '포트폴리오 레퍼런스 수집하기', - }, - { - imageUrl: '/images/category/exercise.png', - category: '운동', - missionTitle: '스쿼트 해서 튼튼해지자!', - }, -]; diff --git a/src/app/mypage/layout.tsx b/src/app/mypage/layout.tsx deleted file mode 100644 index 17424ff9..00000000 --- a/src/app/mypage/layout.tsx +++ /dev/null @@ -1,14 +0,0 @@ -import React, { type PropsWithChildren } from 'react'; -import { css } from '@/styled-system/css'; - -function Layout({ children }: PropsWithChildren) { - return
{children}
; -} - -export default Layout; - -const mainCss = css({ - maxWidth: 'maxWidth', - margin: '0 auto', - minHeight: '100vh', -}); diff --git a/src/app/mypage/login_info/layout.tsx b/src/app/mypage/login_info/layout.tsx deleted file mode 100644 index 2979c154..00000000 --- a/src/app/mypage/login_info/layout.tsx +++ /dev/null @@ -1,18 +0,0 @@ -import React, { type PropsWithChildren } from 'react'; -import Header from '@/components/Header/Header'; -import { css } from '@/styled-system/css'; - -function LoginInfoLayout({ children }: PropsWithChildren) { - return ( - <> -
-
{children}
- - ); -} - -export default LoginInfoLayout; - -const mainCss = css({ - padding: '16px', -}); diff --git a/src/app/mypage/setting_and_private/layout.tsx b/src/app/mypage/setting_and_private/layout.tsx deleted file mode 100644 index 8a4a878b..00000000 --- a/src/app/mypage/setting_and_private/layout.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import React, { type PropsWithChildren } from 'react'; -import Header from '@/components/Header/Header'; -import { css } from '@/styled-system/css'; - -function Layout({ children }: PropsWithChildren) { - return ( - <> -
-
{children}
- - ); -} - -export default Layout; -const mainCss = css({ - maxWidth: 'maxWidth', - margin: '0 auto', - minHeight: '100vh', - backgroundColor: 'bg.surface2', -}); diff --git a/src/app/mypage/setting_and_private/page.tsx b/src/app/mypage/setting_and_private/page.tsx deleted file mode 100644 index 65e6d212..00000000 --- a/src/app/mypage/setting_and_private/page.tsx +++ /dev/null @@ -1,11 +0,0 @@ -import MenuList from '../MenuList'; - -function Mypage() { - return ( -
- -
- ); -} - -export default Mypage; diff --git a/src/app/mypage/terms/layout.tsx b/src/app/mypage/terms/layout.tsx deleted file mode 100644 index a95d674e..00000000 --- a/src/app/mypage/terms/layout.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import React, { type PropsWithChildren } from 'react'; -import Header from '@/components/Header/Header'; - -function TermLayout({ children }: PropsWithChildren) { - return ( - <> -
-
{children}
- - ); -} - -export default TermLayout; diff --git a/src/app/mypage/terms/page.tsx b/src/app/mypage/terms/page.tsx deleted file mode 100644 index 1ba63bdc..00000000 --- a/src/app/mypage/terms/page.tsx +++ /dev/null @@ -1,24 +0,0 @@ -import React from 'react'; -import { TERMS } from '@/app/mypage/terms/terms.constants'; -import { flex } from '@/styled-system/patterns'; - -function TermPage() { - return ( -
- {TERMS.split('\n').map((line, index) => ( -

{line}

- ))} -
- ); -} - -export default TermPage; - -const containerCss = flex({ - flexDirection: 'column', - gap: '8px', - color: 'text.primary', - padding: '30px 20px', - - textStyle: 'body1', -}); diff --git a/src/app/mypage/withdrawal/layout.tsx b/src/app/mypage/withdrawal/layout.tsx deleted file mode 100644 index 4ba70834..00000000 --- a/src/app/mypage/withdrawal/layout.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import { type PropsWithChildren } from 'react'; -import Header from '@/components/Header/Header'; -import { flex } from '@/styled-system/patterns'; - -function WithdrawalLayout({ children }: PropsWithChildren) { - return ( -
-
-
{children}
-
- ); -} - -export default WithdrawalLayout; - -const containerCss = flex({ - minHeight: '100vh', - flexDirection: 'column', - - paddingBottom: '34px', // indicator -}); - -const mainCss = flex({ - padding: '24px 16px 0', - flex: 1, - - justifyContent: 'space-between', - flexDirection: 'column', -}); diff --git a/src/app/mypage/withdrawal/page.tsx b/src/app/mypage/withdrawal/page.tsx deleted file mode 100644 index 1792ff3f..00000000 --- a/src/app/mypage/withdrawal/page.tsx +++ /dev/null @@ -1,77 +0,0 @@ -'use client'; - -import { useRouter } from 'next/navigation'; -import { useWithdrawalMember } from '@/apis/member'; -import Button from '@/components/Button/Button'; -import { useSnackBar } from '@/components/SnackBar/SnackBarProvider'; -import { ROUTER } from '@/constants/router'; -import { removeTokens } from '@/services/auth/actions'; -import { css } from '@/styled-system/css'; -import { grid } from '@/styled-system/patterns'; - -function WithdrawalPage() { - const router = useRouter(); - const { triggerSnackBar } = useSnackBar(); - const { mutate } = useWithdrawalMember({ - onSuccess: () => { - removeTokens(); - triggerSnackBar({ - message: '회원탈퇴 했습니다.', - }); - router.push(ROUTER.AUTH.LOGIN); - }, - onError: () => { - triggerSnackBar({ - message: '회원탈퇴에 실패했습니다.', - }); - }, - }); - - const onCancel = () => { - router.back(); - }; - - const onWithdrawal = () => { - mutate(); - }; - - return ( - <> -
-

벌써 헤어지다니 너무 아쉬워요...

-

지금 탈퇴하시면 미션과 관련된 모든 내용이 삭제돼요.

-

그래도 탈퇴하시겠어요?

-
- - {/* TODO : 슬픈 이미지 */} - -
- - -
- - ); -} - -export default WithdrawalPage; - -const headingCss = css({ - textStyle: 'title2', - color: 'text.primary', - marginBottom: '4px', -}); - -const subHeadingCss = css({ - color: 'text.secondary', - textStyle: 'body4', -}); - -const buttonWrapper = grid({ - gap: '8px', - gridTemplateColumns: '1fr 1fr', - margin: '16px 0', -}); diff --git a/src/app/privacy/layout.tsx b/src/app/privacy/layout.tsx deleted file mode 100644 index f96230e5..00000000 --- a/src/app/privacy/layout.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import React, { type PropsWithChildren } from 'react'; -import Header from '@/components/Header/Header'; - -function PrivacyLayout({ children }: PropsWithChildren) { - return ( - <> -
-
{children}
- - ); -} - -export default PrivacyLayout; diff --git a/src/app/privacy/page.tsx b/src/app/privacy/page.tsx deleted file mode 100644 index 91ad2062..00000000 --- a/src/app/privacy/page.tsx +++ /dev/null @@ -1,24 +0,0 @@ -import React from 'react'; -import { PRIVACY } from '@/app/privacy/privacy.contants'; -import { flex } from '@/styled-system/patterns'; - -function PrivacyPage() { - return ( -
- {PRIVACY.split('\n').map((line, index) => ( -

{line}

- ))} -
- ); -} - -export default PrivacyPage; - -const containerCss = flex({ - flexDirection: 'column', - gap: '8px', - color: 'text.primary', - padding: '30px 20px', - - textStyle: 'body1', -}); diff --git a/src/app/record/[id]/detail/layout.tsx b/src/app/record/[id]/detail/layout.tsx deleted file mode 100644 index 67819a7d..00000000 --- a/src/app/record/[id]/detail/layout.tsx +++ /dev/null @@ -1,15 +0,0 @@ -import { type PropsWithChildren } from 'react'; -import { css } from '@styled-system/css'; - -export default function Layout({ children }: PropsWithChildren) { - return
{children}
; -} - -const containerCss = css({ - maxWidth: 'maxWidth', - margin: '0 auto', - minHeight: '100vh', - - display: 'flex', - flexDirection: 'column', -}); diff --git a/src/app/record/[id]/edit/loading.tsx b/src/app/record/[id]/edit/loading.tsx deleted file mode 100644 index 872de284..00000000 --- a/src/app/record/[id]/edit/loading.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import Header from '@/components/Header/Header'; -import TextArea from '@/components/TextArea/TextArea'; -import { css } from '@styled-system/css'; - -export default function LoadingPage() { - return ( -
-
-