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,