leezng commented on code in PR #9006:
URL: https://github.com/apache/inlong/pull/9006#discussion_r1349816487


##########
inlong-dashboard/src/ui/components/CheckCard/index.tsx:
##########
@@ -62,13 +63,9 @@ const CheckCard: React.FC<CheckCardProps> = ({ options, 
value, onChange, disable
     */
     (async () => {
       setLogoMap(
-        (
-          await Promise.allSettled(options.map(option => 
import(`./logo/${option.label}.png`)))
-        ).reduce((res, item) => {
-          if (item.status === 'fulfilled') {
-            const {
-              value: { default: url },
-            } = item;
+        (await Promise.allSettled(options.map(option => 
option.image))).reduce((res, item) => {
+          if (item.status === 'fulfilled' && item.value) {
+            const url = typeof item.value === 'string' ? item.value : 
item.value.default;
             res[url.split('/').pop().split('.').shift()] = url;

Review Comment:
   Can the key here use the label or value in options? If splicing the URL here 
may not guarantee uniqueness?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to