From 9e9ff5bd79d52e05eea57170885c695beae39b8c Mon Sep 17 00:00:00 2001 From: wenjun li Date: Sat, 2 Nov 2024 10:07:23 -0700 Subject: [PATCH] fix: ui fixes --- packages/front-end/src/components/result.tsx | 147 ++++++++++--------- 1 file changed, 80 insertions(+), 67 deletions(-) diff --git a/packages/front-end/src/components/result.tsx b/packages/front-end/src/components/result.tsx index 548b12f..236bd2a 100644 --- a/packages/front-end/src/components/result.tsx +++ b/packages/front-end/src/components/result.tsx @@ -111,7 +111,9 @@ export const Result = (props: { }} > }> - {t('result_table_title')} {props.ind + 1} + + {t('result_table_title')} {props.ind + 1} + - {t('result_table_quartz_title')} + + {t('result_table_quartz_title')} + +
- {t('result_table_elements_title')} + + {t('result_table_elements_title')} +
+
- {t('result_table_shard_skills_title')} + + {t('result_table_shard_skills_title')} + {props.data.map((row, index) => ( - + {tableHead[index]} - - {row.fulfilledShardSkills.map((skillId, ind) => ( - - - {getShardSkillById(skillId).name_i18n[gc.language]} - - - ))} - + + + {row.fulfilledShardSkills + .map( + skillId => + getShardSkillById(skillId).name_i18n[gc.language], + ) + .join(`${t('comma')} `)} + ))} {!!missedQuartz.length && ( - - {t('result_table_missed_quartz_title')} - - {missedQuartz - .map(quartzId => getQuartzById(quartzId).name_i18n[gc.language]) - .join(`${t('comma')} `)} - - + <> +
+ + + {t('result_table_missed_quartz_title')} + + + {missedQuartz + .map( + quartzId => getQuartzById(quartzId).name_i18n[gc.language], + ) + .join(`${t('comma')} `)} + + + )} {!!missedShardSkills.flat().length && ( - - - {t('result_table_missed_shard_skills_title')} - - - {missedShardSkills.map((row, index) => ( - - - {tableHead[index]} - - - {!!row.length ? ( - row.map((skillId, ind) => ( - - - {getShardSkillById(skillId).name_i18n[gc.language]} - - - )) - ) : ( - {t('empty')} - )} + <> +
+ + + {t('result_table_missed_shard_skills_title')} + + + {missedShardSkills.map((row, index) => ( + + + {tableHead[index]} + + + {!!row.length ? ( + + {row + .map( + skillId => + getShardSkillById(skillId).name_i18n[ + gc.language + ], + ) + .join(`${t('comma')} `)} + + ) : ( + {t('empty')} + )} + - - ))} + ))} +
-
+ )}