refactor: simplify naming after filter removal
This commit is contained in:
parent
8e4bb9a3fb
commit
82132e8eb8
2 changed files with 6 additions and 7 deletions
|
|
@ -86,13 +86,13 @@ const Customers = () => {
|
|||
const handleCustomerClicked = customer =>
|
||||
navigate(`/compliance/customer/${customer.id}`)
|
||||
|
||||
const [filteredCustomers, setFilteredCustomers] = useState([])
|
||||
const [customers, setCustomers] = useState([])
|
||||
const [showCreationModal, setShowCreationModal] = useState(false)
|
||||
|
||||
const { data: customersResponse, loading: customerLoading } = useQuery(
|
||||
GET_CUSTOMERS,
|
||||
{
|
||||
onCompleted: data => setFilteredCustomers(R.path(['customers'])(data)),
|
||||
onCompleted: data => setCustomers(R.path(['customers'])(data)),
|
||||
},
|
||||
)
|
||||
|
||||
|
|
@ -123,7 +123,7 @@ const Customers = () => {
|
|||
const customersData = R.pipe(
|
||||
R.map(setAuthorizedStatus),
|
||||
R.sortWith([R.ascend(byAuthorized), R.descend(byLastActive)]),
|
||||
)(filteredCustomers ?? [])
|
||||
)(customers ?? [])
|
||||
|
||||
return (
|
||||
<>
|
||||
|
|
@ -143,7 +143,7 @@ const Customers = () => {
|
|||
/>
|
||||
<CustomersList
|
||||
data={customersData}
|
||||
locale={locale}
|
||||
country={locale?.country}
|
||||
onClick={handleCustomerClicked}
|
||||
loading={customerLoading}
|
||||
/>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue