fix: handle optional user_group_ratio in LogsTable and render helper
This commit is contained in:
@@ -920,7 +920,6 @@ const LogsTable = () => {
|
|||||||
other.completion_ratio,
|
other.completion_ratio,
|
||||||
other.model_price,
|
other.model_price,
|
||||||
other.group_ratio,
|
other.group_ratio,
|
||||||
other.user_group_ratio,
|
|
||||||
other.cache_ratio || 1.0,
|
other.cache_ratio || 1.0,
|
||||||
other.cache_creation_ratio || 1.0,
|
other.cache_creation_ratio || 1.0,
|
||||||
)
|
)
|
||||||
@@ -929,7 +928,7 @@ const LogsTable = () => {
|
|||||||
other.completion_ratio,
|
other.completion_ratio,
|
||||||
other.model_price,
|
other.model_price,
|
||||||
other.group_ratio,
|
other.group_ratio,
|
||||||
other.user_group_ratio,
|
other?.user_group_ratio,
|
||||||
),
|
),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -448,8 +448,8 @@ export function renderLogContent(
|
|||||||
user_group_ratio,
|
user_group_ratio,
|
||||||
image = false,
|
image = false,
|
||||||
imageRatio = 1.0,
|
imageRatio = 1.0,
|
||||||
|
useUserGroupRatio = undefined
|
||||||
) {
|
) {
|
||||||
const useUserGroupRatio = isValidGroupRatio(user_group_ratio);
|
|
||||||
const ratioLabel = useUserGroupRatio ? i18next.t('专属倍率') : i18next.t('分组倍率');
|
const ratioLabel = useUserGroupRatio ? i18next.t('专属倍率') : i18next.t('分组倍率');
|
||||||
const ratio = useUserGroupRatio ? user_group_ratio : groupRatio;
|
const ratio = useUserGroupRatio ? user_group_ratio : groupRatio;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user