Skip to content

Commit

Permalink
refactor: remove mobx
Browse files Browse the repository at this point in the history
  • Loading branch information
biud436 committed Jan 2, 2025
1 parent 85f165f commit 1711833
Show file tree
Hide file tree
Showing 47 changed files with 909 additions and 1,127 deletions.
108 changes: 0 additions & 108 deletions .pnp.cjs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
4 changes: 0 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,6 @@
"inquirer-directory": "2.2.0",
"lint-staged": "12.1.7",
"marked-react": "^1.3.0",
"mobx": "^6.5.0",
"mobx-persist-store": "^1.1.2",
"mobx-react": "^7.5.2",
"mobx-react-lite": "^3.4.0",
"next": "^14.2.15",
"next-mdx-remote": "^4.2.0",
"node-plop": "0.26.2",
Expand Down
15 changes: 8 additions & 7 deletions src/app/api/github/login/route.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
/* eslint-disable @typescript-eslint/no-unused-vars */
// app/api/github/login/route.ts
import { redirect } from 'next/navigation';
import { NextRequest } from 'next/server';

export async function GET(request: NextRequest) {
// 환경 변수가 정의되어 있지 않은 경우 에러 처리
if (!process.env.NEXT_PUBLIC_SERVER_URL) {
throw new Error('Server URL is not defined');
}
// 환경 변수가 정의되어 있지 않은 경우 에러 처리
if (!process.env.NEXT_PUBLIC_SERVER_URL) {
throw new Error('Server URL is not defined');
}

// GitHub 로그인 URL로 리다이렉트
redirect(`${process.env.NEXT_PUBLIC_SERVER_URL}/auth/github/login`);
// GitHub 로그인 URL로 리다이렉트
redirect(`${process.env.NEXT_PUBLIC_SERVER_URL}/auth/github/login`);
}

// 허용된 HTTP 메서드 정의
export const dynamic = 'force-dynamic';
export const runtime = 'edge'; // Optional: Edge Runtime 사용 시
export const runtime = 'edge'; // Optional: Edge Runtime 사용 시
2 changes: 1 addition & 1 deletion src/app/auth/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ import React from 'react';
import { LoginContainer } from '@/components/pages/LoginContainer';

export default function Login() {
return <LoginContainer />;
return <LoginContainer />;
}
38 changes: 19 additions & 19 deletions src/app/edit2/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,24 @@ import { CircularProgress, Stack } from '@mui/material';
import { EditorContainer } from '../../components/post/editor/EditorContainer';

export default function Editor() {
return (
<Suspense
fallback={
<Stack
direction={'column'}
sx={{
width: '100%',
height: '100%',
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
}}
>
<CircularProgress />
</Stack>
}
return (
<Suspense
fallback={
<Stack
direction={'column'}
sx={{
width: '100%',
height: '100%',
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
}}
>
<EditorContainer />
</Suspense>
);
<CircularProgress />
</Stack>
}
>
<EditorContainer />
</Suspense>
);
}
7 changes: 1 addition & 6 deletions src/app/manage/category/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,7 @@

import React from 'react';
import { CategoryTreeEditorContainer } from '@/components/manage/category/CategoryTreeEditorContainer';
import { ManageLayout } from '@/layouts/ManageLayout';

export default function CategoryEditorPage() {
return (
<ManageLayout>
<CategoryTreeEditorContainer />
</ManageLayout>
);
return <CategoryTreeEditorContainer />;
}
16 changes: 16 additions & 0 deletions src/app/manage/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
'use client';

import React from 'react';
import { ManageLayout } from '@/layouts/ManageLayout';

interface LayoutProps {
children: React.ReactNode[];
}

export default function Layout({ children }: LayoutProps) {
return (
<ManageLayout>
<>{children}</>
</ManageLayout>
);
}
7 changes: 1 addition & 6 deletions src/app/manage/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,7 @@

import React from 'react';
import { ManagePresent } from '@/components/manage/ManagePresent';
import { ManageLayout } from '@/layouts/ManageLayout';

export default function ManagePage() {
return (
<ManageLayout>
<ManagePresent />
</ManageLayout>
);
return <ManagePresent />;
}
Loading

0 comments on commit 1711833

Please sign in to comment.