|
@@ -80,7 +80,6 @@ const SelectComponentsUnit: React.FC<Props> = ({ num: count, defaultParams, chec
|
|
|
}, [accountCreateLogs])
|
|
|
|
|
|
useEffect(() => {
|
|
|
- console.log('defaultParams--->', defaultParams)
|
|
|
if (unitAccountId) {
|
|
|
const materialType = defaultParams.materialType
|
|
|
let componentSubType: string[] = []
|
|
@@ -122,8 +121,10 @@ const SelectComponentsUnit: React.FC<Props> = ({ num: count, defaultParams, chec
|
|
|
}
|
|
|
}
|
|
|
setComponentSubType(componentSubType)
|
|
|
- // defaultParams
|
|
|
- const params = { ...searchParams, ...queryParams, adAccountId: unitAccountId, componentSubType, isDeleted: false }
|
|
|
+ const params = { ...searchParams, ...queryParams, adAccountId: unitAccountId, isDeleted: false }
|
|
|
+ if (!params?.componentSubType?.length) {
|
|
|
+ params['componentSubType'] = componentSubType
|
|
|
+ }
|
|
|
getCreativeComponentList.run(params)
|
|
|
}
|
|
|
}, [queryParams, defaultParams, searchParams, unitAccountId, isGroup, count])
|