Skip to content

Commit 9d569f5

Browse files
committed
Merge branch 'pre-production' into production
2 parents 9fd02b6 + 8041ebb commit 9d569f5

File tree

61 files changed

+737
-193
lines changed

Some content is hidden

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

61 files changed

+737
-193
lines changed

apps/service/eslint.config.mjs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,19 @@
11
import baseConfig from '../../eslint.config.mjs';
2+
import { FlatCompat } from '@eslint/eslintrc';
3+
import { fileURLToPath } from 'url';
4+
import path from 'path';
5+
6+
const __filename = fileURLToPath(import.meta.url);
7+
const __dirname = path.dirname(__filename);
8+
9+
const compat = new FlatCompat({
10+
baseDirectory: __dirname,
11+
});
212

313
/** @type {import("eslint").FlatConfig[]} */
414
export default [
515
...baseConfig,
16+
...compat.extends('next/core-web-vitals'),
617
{
718
rules: {
819
'react/react-in-jsx-scope': 'off', // Next.js에서는 불필요

apps/service/next.config.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
import type { NextConfig } from 'next';
22

33
const nextConfig: NextConfig = {
4+
images: {
5+
domains: ['s3-moplus.s3.ap-northeast-2.amazonaws.com'],
6+
},
7+
48
webpack(config) {
59
config.module.rules.push({
610
test: /\.svg$/i,

apps/service/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
"@types/node": "^20",
2929
"@types/react": "^19",
3030
"@types/react-dom": "^19",
31+
"eslint-config-next": "^15.2.4",
3132
"openapi-typescript": "^7.6.1"
3233
}
3334
}

apps/service/src/apis/authMiddleware.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
'use client';
2-
import { getAccessToken, setAccessToken } from '@utils';
32
import { Middleware } from 'openapi-fetch';
43

4+
import { getAccessToken, setAccessToken } from '@utils';
5+
56
const UNPROTECTED_ROUTES = ['/api/v1/auth/admin/login', '/api/v1/auth/oauth/social-login'];
67

78
const reissueToken = async () => {

apps/service/src/apis/client.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
import { paths } from '@schema';
21
import createFetchClient from 'openapi-fetch';
32
import createClient from 'openapi-react-query';
43

4+
import { paths } from '@schema';
5+
56
export const client = createFetchClient<paths>({
67
baseUrl: process.env.NEXT_PUBLIC_API_BASE_URL,
78
});

apps/service/src/apis/controller/auth/postKakaoLogin.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
'use client';
22

33
import { setAccessToken, setName } from '@utils';
4-
54
import { client } from '@/apis/client';
65

76
const postKakaoAccessToken = async (code: string) => {
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
import getCommentary from './getCommentary';
1+
import useGetCommentary from './useGetCommentary';
22

3-
export { getCommentary };
3+
export { useGetCommentary };

apps/service/src/apis/controller/commentary/getCommentary.ts renamed to apps/service/src/apis/controller/commentary/useGetCommentary.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { TanstackQueryClient } from '@apis';
22

3-
type GetCommentaryProps = {
3+
type UseGetCommentaryProps = {
44
publishId: string;
55
problemId: string;
66
};
77

8-
const getCommentary = ({ publishId, problemId }: GetCommentaryProps) => {
8+
const useGetCommentary = ({ publishId, problemId }: UseGetCommentaryProps) => {
99
return TanstackQueryClient.useQuery(
1010
'get',
1111
'/api/v1/client/commentary',
@@ -24,4 +24,4 @@ const getCommentary = ({ publishId, problemId }: GetCommentaryProps) => {
2424
);
2525
};
2626

27-
export default getCommentary;
27+
export default useGetCommentary;
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
import getHomeFeed from './getHomeFeed';
1+
import useGetHomeFeed from './useGetHomeFeed';
22

3-
export { getHomeFeed };
3+
export { useGetHomeFeed };

apps/service/src/apis/controller/home/getHomeFeed.ts renamed to apps/service/src/apis/controller/home/useGetHomeFeed.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { TanstackQueryClient } from '@apis';
22

3-
const getHomeFeed = () => {
3+
const useGetHomeFeed = () => {
44
return TanstackQueryClient.useQuery(
55
'get',
66
'/api/v1/client/home-feed',
@@ -12,4 +12,4 @@ const getHomeFeed = () => {
1212
);
1313
};
1414

15-
export default getHomeFeed;
15+
export default useGetHomeFeed;

0 commit comments

Comments
 (0)