This commit is contained in:
PhilReact 2025-02-28 21:46:14 +02:00
parent 29ea762943
commit c772e8cebe

View File

@ -102,7 +102,16 @@ export const UserLookup = ({ isOpenDrawerLookup, setIsOpenDrawerLookup }) => {
}; };
}, [openUserLookupDrawerFunc]); }, [openUserLookupDrawerFunc]);
const onClose = ()=> {
setIsOpenDrawerLookup(false)
setNameOrAddress('')
setErrorMessage('')
setPayments([])
setIsLoadingUser(false)
setIsLoadingPayments(false)
setAddressInfo(null)
}
return ( return (
<DrawerUserLookup open={isOpenDrawerLookup} setOpen={setIsOpenDrawerLookup}> <DrawerUserLookup open={isOpenDrawerLookup} setOpen={setIsOpenDrawerLookup}>
@ -138,7 +147,9 @@ export const UserLookup = ({ isOpenDrawerLookup, setIsOpenDrawerLookup }) => {
} }
}} }}
/> />
<ButtonBase onClick={lookupFunc} > <ButtonBase onClick={()=> {
lookupFunc();
}} >
<SearchIcon sx={{ <SearchIcon sx={{
color: 'white', color: 'white',
marginRight: '20px' marginRight: '20px'
@ -148,7 +159,7 @@ export const UserLookup = ({ isOpenDrawerLookup, setIsOpenDrawerLookup }) => {
marginLeft: 'auto', marginLeft: 'auto',
}} onClick={()=> { }} onClick={()=> {
setIsOpenDrawerLookup(false) onClose()
}}> }}>
<CloseFullscreenIcon sx={{ <CloseFullscreenIcon sx={{
color: 'white' color: 'white'