From fd1890dfc8858882dc5ec3851fd557e7902cbf2d Mon Sep 17 00:00:00 2001
From: llddang <77055208+llddang@users.noreply.github.com>
Date: Thu, 24 Oct 2024 15:39:28 +0900
Subject: [PATCH 1/2] =?UTF-8?q?Feature/#222=20=EB=A7=88=EC=9D=BC=EC=8A=A4?=
=?UTF-8?q?=ED=86=A4=20=EB=AA=A9=EB=A1=9D=ED=8E=98=EC=9D=B4=EC=A7=80?=
=?UTF-8?q?=EC=97=90=EC=84=9C=20=ED=8E=98=EC=9D=B4=EC=A7=80=EB=84=A4?=
=?UTF-8?q?=EB=B9=84=EA=B2=8C=EC=9D=B4=EC=85=98=EC=97=90=20=EA=B2=80?=
=?UTF-8?q?=EC=83=89=ED=95=84=ED=84=B0=20=EC=A0=81=EC=9A=A9=20(#224)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* feat: 마일스톤 목록페이지에서 쿼리 적용
* refactor: 사용하지 않는 임포트 구문 삭제
* feat: 마일스톤 랭킹 페이지에서 페이지 네이션 동작하도록 수정
* feat: 배포 시 콘솔 로그 안 나오도록 수정
---
frontend/next.config.mjs | 6 ++++++
frontend/src/app/admin/milestone/list/page.tsx | 9 ++++++---
frontend/src/app/admin/milestone/rank/page.tsx | 8 +++++---
3 files changed, 17 insertions(+), 6 deletions(-)
diff --git a/frontend/next.config.mjs b/frontend/next.config.mjs
index 3b4cd057..e2b7bfd6 100644
--- a/frontend/next.config.mjs
+++ b/frontend/next.config.mjs
@@ -9,4 +9,10 @@ const nextConfig = {
},
};
+if (process.env.NEXT_PUBLIC_NODE_ENV === 'prod') {
+ nextConfig.compiler = {
+ removeConsole: true,
+ };
+}
+
export default nextConfig;
diff --git a/frontend/src/app/admin/milestone/list/page.tsx b/frontend/src/app/admin/milestone/list/page.tsx
index 8abc9ffb..7120f81f 100644
--- a/frontend/src/app/admin/milestone/list/page.tsx
+++ b/frontend/src/app/admin/milestone/list/page.tsx
@@ -10,8 +10,6 @@ import MilestoneHistoryTable from './components/MilestoneHistoryTable';
import MilestoneHistoryExcelFileDownloadButton from './components/MilestoneHistoryTable/MilestoneHistoryExcelFileDownloadButton.tsx';
import { AuthSliceState } from '@/store/auth.slice';
import { getAuthFromCookie } from '@/lib/utils/auth';
-import { BusinessError } from '@/types/error';
-import { redirect } from 'next/navigation';
const Page = async ({ searchParams }: { searchParams?: { [key: string]: string | undefined } }) => {
const headersList = headers();
@@ -47,7 +45,12 @@ const Page = async ({ searchParams }: { searchParams?: { [key: string]: string |
-
+
);
};
diff --git a/frontend/src/app/admin/milestone/rank/page.tsx b/frontend/src/app/admin/milestone/rank/page.tsx
index aab31f4e..a933de12 100644
--- a/frontend/src/app/admin/milestone/rank/page.tsx
+++ b/frontend/src/app/admin/milestone/rank/page.tsx
@@ -7,7 +7,7 @@
'use client';
import { DateTime } from 'luxon';
-import { usePathname } from 'next/navigation';
+import { usePathname, useSearchParams } from 'next/navigation';
import { useMemo, useState } from 'react';
import Pagination from '@/adminComponents/Pagination';
@@ -19,14 +19,16 @@ import { convertMilestoneGroup } from '@/lib/utils/utils';
import { Period } from '@/types/common';
import { toast } from 'react-toastify';
-const Page = ({ searchParams }: { searchParams?: { [key: string]: string | undefined } }) => {
+const Page = () => {
const [filterPeriod, setFilterPeriod] = useState({
startDate: DateTime.now().minus({ years: 1 }).toFormat('yyyy-MM-dd'),
endDate: DateTime.now().toFormat('yyyy-MM-dd'),
});
const [searchFilterPeriod, setSearchFilterPeriod] = useState(filterPeriod);
+ const searchParams = useSearchParams();
const pathname = usePathname();
- const page = searchParams?.page ? parseInt(searchParams.page, 10) : 1;
+ const page = parseInt(searchParams.get('page') || '1', 10);
+ console.log(page);
const { data: excelFile } = useMilestoneHistoryScoreExcelFileQuery(
searchFilterPeriod.startDate,
From 93731556a93ef6670c164400f6d9185692e15d22 Mon Sep 17 00:00:00 2001
From: llddang <77055208+llddang@users.noreply.github.com>
Date: Thu, 24 Oct 2024 15:40:29 +0900
Subject: [PATCH 2/2] =?UTF-8?q?Feature/#223=20=EB=A7=88=EC=9D=BC=EC=8A=A4?=
=?UTF-8?q?=ED=86=A4=20=EB=93=B1=EB=A1=9D=20=EC=8B=9C=20=ED=8C=8C=EC=9D=BC?=
=?UTF-8?q?=EB=AA=85=20=ED=95=84=ED=84=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../milestone/application/MilestoneHistoryCommandService.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/backend/src/main/java/sw_css/milestone/application/MilestoneHistoryCommandService.java b/backend/src/main/java/sw_css/milestone/application/MilestoneHistoryCommandService.java
index 65fb1658..d22fa3fb 100644
--- a/backend/src/main/java/sw_css/milestone/application/MilestoneHistoryCommandService.java
+++ b/backend/src/main/java/sw_css/milestone/application/MilestoneHistoryCommandService.java
@@ -74,7 +74,7 @@ private String generateFilePath(final MultipartFile file) {
if (file == null) {
return null;
}
- return UUID.randomUUID() + "_" + file.getOriginalFilename();
+ return UUID.randomUUID() + "_" + file.getOriginalFilename().replaceAll("\\[|\\]", "");
}
private void uploadFile(final MultipartFile file, final String newFilePath) {