fix: leaderboard loading issue

This commit is contained in:
Timothy Jaeryang Baek 2025-07-30 14:18:36 +04:00
parent 3ab10c6758
commit f027df06d1
2 changed files with 16 additions and 11 deletions

View File

@ -355,17 +355,20 @@
</div>
</div>
</td>
{#if feedback?.data?.rating}
<td class="px-3 py-1 text-right font-medium text-gray-900 dark:text-white w-max">
<div class=" flex justify-end">
{#if feedback.data.rating.toString() === '1'}
{#if feedback?.data?.rating.toString() === '1'}
<Badge type="info" content={$i18n.t('Won')} />
{:else if feedback.data.rating.toString() === '0'}
{:else if feedback?.data?.rating.toString() === '0'}
<Badge type="muted" content={$i18n.t('Draw')} />
{:else if feedback.data.rating.toString() === '-1'}
{:else if feedback?.data?.rating.toString() === '-1'}
<Badge type="error" content={$i18n.t('Lost')} />
{/if}
</div>
</td>
{/if}
<td class=" px-3 py-1 text-right font-medium">
{dayjs(feedback.updated_at * 1000).fromNow()}

View File

@ -151,6 +151,8 @@
}
feedbacks.forEach((feedback) => {
if (!feedback?.data?.model_id || !feedback?.data?.rating) return;
const modelA = feedback.data.model_id;
const statsA = getOrDefaultStats(modelA);
let outcome: number;