File tree Expand file tree Collapse file tree 3 files changed +21
-3
lines changed
src/app/desktop/(nav-bar) Expand file tree Collapse file tree 3 files changed +21
-3
lines changed Original file line number Diff line number Diff line change @@ -126,6 +126,12 @@ export default function AdminInquiryPage() {
126126 mutation . mutate ( selectedMembers ) ;
127127 } ;
128128
129+ const handleSearch = async ( ) => {
130+ await refetch ( ) . then ( ( ) => {
131+ setPage ( 1 ) ;
132+ } ) ;
133+ } ;
134+
129135 return (
130136 < div className = "flex flex-col justify-center gap-8 px-4 md:px-16 lg:px-64" >
131137 < div className = "pt-20 text-center" >
@@ -136,7 +142,7 @@ export default function AdminInquiryPage() {
136142 placeholder = "이름을 입력해 주세요"
137143 value = { searchQuery }
138144 onChange = { ( e ) => setSearchQuery ( e . target . value ) }
139- onSearch = { refetch }
145+ onSearch = { handleSearch }
140146 />
141147 < Sidebar triggerText = "새로운 관리자 추가하기" title = "관리자 추가하기" >
142148 < div className = "flex w-full flex-col items-center justify-center" >
Original file line number Diff line number Diff line change @@ -121,6 +121,12 @@ export default function ItemListPage() {
121121 setSelectedItem ( 0 ) ;
122122 } ;
123123
124+ const handleSearch = async ( ) => {
125+ await refetch ( ) . then ( ( ) => {
126+ setPage ( 1 ) ;
127+ } ) ;
128+ } ;
129+
124130 return (
125131 < div className = "flex flex-col justify-center gap-8 px-4 md:px-16 lg:px-64" >
126132 < div className = "pt-20 text-center" >
@@ -131,7 +137,7 @@ export default function ItemListPage() {
131137 placeholder = "물품 이름을 입력해 주세요"
132138 value = { searchQuery }
133139 onChange = { ( e ) => setSearchQuery ( e . target . value ) }
134- onSearch = { refetch }
140+ onSearch = { handleSearch }
135141 />
136142 < Sidebar triggerText = "복지 물품 추가하기" title = "복지 물품 추가하기" >
137143 < div className = "mt-4 flex flex-col gap-2" >
Original file line number Diff line number Diff line change @@ -146,6 +146,12 @@ export default function PayerInquiryPage() {
146146 mutation . mutate ( { payers : addedData } ) ;
147147 } ;
148148
149+ const handleSearch = async ( ) => {
150+ await refetch ( ) . then ( ( ) => {
151+ setPage ( 1 ) ;
152+ } ) ;
153+ } ;
154+
149155 return (
150156 < div className = "flex flex-col justify-center gap-8 px-4 md:px-16 lg:px-64" >
151157 < div className = "pt-20 text-center" >
@@ -156,7 +162,7 @@ export default function PayerInquiryPage() {
156162 placeholder = "이름을 입력해 주세요"
157163 value = { searchQuery }
158164 onChange = { ( e ) => setSearchQuery ( e . target . value ) }
159- onSearch = { refetch }
165+ onSearch = { handleSearch }
160166 />
161167 < Sidebar
162168 triggerText = "새로운 납부자 추가하기"
You can’t perform that action at this time.
0 commit comments