diff --git a/client/src/components/Reports/Reports.tsx b/client/src/components/Reports/Reports.tsx
index cdd6d6bea..74b59dbb9 100644
--- a/client/src/components/Reports/Reports.tsx
+++ b/client/src/components/Reports/Reports.tsx
@@ -5,7 +5,7 @@ import useReportsPage from '@hooks/useReportsPage';
import {ExpenseList, Flex} from '@HDesign/index';
const Reports = () => {
- const {isEmpty, expenseListProp, name, changeName} = useReportsPage();
+ const {isEmpty, expenseListProp, memberName, changeName} = useReportsPage();
if (isEmpty) {
return ;
@@ -13,7 +13,12 @@ const Reports = () => {
return (
-
+
);
};
diff --git a/client/src/hooks/useReportsPage.ts b/client/src/hooks/useReportsPage.ts
index 7dc7e2726..711027cf0 100644
--- a/client/src/hooks/useReportsPage.ts
+++ b/client/src/hooks/useReportsPage.ts
@@ -9,12 +9,12 @@ import {useSearchReports} from './useSearchReports';
import toast from './useToast/toast';
const useReportsPage = () => {
- const [name, setName] = useState('');
+ const [memberName, setMemberName] = useState('');
const {bankName, accountNumber} = useOutletContext();
- const {matchedReports, reports} = useSearchReports({name});
+ const {matchedReports, reports} = useSearchReports({memberName});
const changeName = ({target}: React.ChangeEvent) => {
- setName(target.value);
+ setMemberName(target.value);
};
const onBankButtonClick = () => {
@@ -41,7 +41,7 @@ const useReportsPage = () => {
return {
isEmpty,
expenseListProp,
- name,
+ memberName,
changeName,
};
};
diff --git a/client/src/hooks/useSearchReports/useSearchReports.tsx b/client/src/hooks/useSearchReports/useSearchReports.tsx
index aec76e2b9..25ce95cca 100644
--- a/client/src/hooks/useSearchReports/useSearchReports.tsx
+++ b/client/src/hooks/useSearchReports/useSearchReports.tsx
@@ -1,14 +1,14 @@
import useRequestGetReports from '@hooks/queries/report/useRequestGetReports';
type UseSearchReportsParams = {
- name: string;
+ memberName: string;
};
-const useSearchReports = ({name}: UseSearchReportsParams) => {
+const useSearchReports = ({memberName}: UseSearchReportsParams) => {
const {reports} = useRequestGetReports();
return {
- matchedReports: reports.filter(memberReport => memberReport.memberName.includes(name)),
+ matchedReports: reports.filter(memberReport => memberReport.memberName.includes(memberName)),
reports,
};
};