Skip to content

Commit

Permalink
Merge branch 'develop' into Feature/#223-마일스톤_등록시_파일명_수정
Browse files Browse the repository at this point in the history
  • Loading branch information
llddang authored Oct 24, 2024
2 parents 01f613f + fd1890d commit 8ff0c48
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
6 changes: 6 additions & 0 deletions frontend/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,10 @@ const nextConfig = {
},
};

if (process.env.NEXT_PUBLIC_NODE_ENV === 'prod') {
nextConfig.compiler = {
removeConsole: true,
};
}

export default nextConfig;
9 changes: 6 additions & 3 deletions frontend/src/app/admin/milestone/list/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -47,7 +45,12 @@ const Page = async ({ searchParams }: { searchParams?: { [key: string]: string |
<div className="flex justify-end">
<MilestoneHistoryExcelFileDownloadButton field={field} keyword={keyword} />
</div>
<Pagination currentPage={page} totalItems={milestoneHistories?.totalElements || 0} pathname={pathname} />
<Pagination
currentPage={page}
totalItems={milestoneHistories?.totalElements || 0}
pathname={pathname}
query={JSON.stringify({ field, keyword })}
/>
</div>
);
};
Expand Down
8 changes: 5 additions & 3 deletions frontend/src/app/admin/milestone/rank/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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<Period>({
startDate: DateTime.now().minus({ years: 1 }).toFormat('yyyy-MM-dd'),
endDate: DateTime.now().toFormat('yyyy-MM-dd'),
});
const [searchFilterPeriod, setSearchFilterPeriod] = useState<Period>(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,
Expand Down

0 comments on commit 8ff0c48

Please sign in to comment.