Feature/user log entrance
This commit is contained in:
@@ -22,7 +22,9 @@ const RahdarCode = ({ rahdarsCode, setRahdarsCode, error, multiple = true }) =>
|
||||
requestOptions: { signal: controller.signal },
|
||||
})
|
||||
.then((response) => {
|
||||
setOptions(response.data.data || []);
|
||||
const combinedArray = [...rahdarsCode, ...response.data.data];
|
||||
const uniqueArray = Array.from(new Map(combinedArray.map((item) => [item.id, item])).values());
|
||||
setOptions(uniqueArray || []);
|
||||
})
|
||||
.catch(() => {
|
||||
setOptions([]);
|
||||
|
||||
Reference in New Issue
Block a user