|
@@ -36,13 +36,13 @@ export function StylistSimulationPage() {
|
|
|
const pageCopy = copy.stylistSimulationPage
|
|
const pageCopy = copy.stylistSimulationPage
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
useEffect(() => {
|
|
|
- listCustomers().then((items) => {
|
|
|
|
|
- setCustomers(items)
|
|
|
|
|
|
|
+ listCustomers().then((result) => {
|
|
|
|
|
+ setCustomers(result.items)
|
|
|
const preset = simulationSession.getCustomerId()
|
|
const preset = simulationSession.getCustomerId()
|
|
|
- if (preset && items.some((item) => item.id === preset)) {
|
|
|
|
|
|
|
+ if (preset && result.items.some((item) => item.id === preset)) {
|
|
|
setSelectedCustomerId(preset)
|
|
setSelectedCustomerId(preset)
|
|
|
- } else if (items.length > 0) {
|
|
|
|
|
- setSelectedCustomerId(items[0].id)
|
|
|
|
|
|
|
+ } else if (result.items.length > 0) {
|
|
|
|
|
+ setSelectedCustomerId(result.items[0].id)
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
listAftercareOptions().then(setAftercareOptions)
|
|
listAftercareOptions().then(setAftercareOptions)
|