fixed missing clear condition

This commit is contained in:
Polaris 2024-08-25 20:51:30 -04:00
parent 2c264351aa
commit 162697fac1

View File

@ -61,11 +61,12 @@ export const columns: ColumnDef<chunithm>[] = [
);
},
cell: ({ row }) => {
// for the love of all that is holy redo this later or be forced to drink from the calice
const skillId = row.original.skillId;
const isClear = row.original.isClear;
let isSuccessText = "";
if (isClear === 1 && skillId === 100010) {
isSuccessText = "Limit Break 【SUN】";
isSuccessText = "Limit Break";
} else if (isClear === 1 && skillId === 100011) {
isSuccessText = "Limit Break++ ";
} else if (isClear === 1 && skillId === 100012) {
@ -110,8 +111,12 @@ export const columns: ColumnDef<chunithm>[] = [
isSuccessText = "Absolute++ 【LMN】";
} else if (isClear === 1 && skillId === 102009) {
isSuccessText = "Catastropy【LMN】";
} else if (isClear === 1 && skillId === 800003) {
isSuccessText = "Clear";
} else if (isClear === 0) {
isSuccessText = "Failed";
} else if (isClear === 1) {
isSuccessText = "Clear";
} else {
isSuccessText = isClear?.toString() ?? "";
}
@ -119,11 +124,11 @@ export const columns: ColumnDef<chunithm>[] = [
return (
<div>
{row.original.score?.toLocaleString()}
<div className="mt-2 rounded-sm bg-primary pl-2 text-primary-foreground">
<div className="mt-2 w-40 rounded-sm bg-primary pl-2 text-primary-foreground">
{isSuccessText}
</div>
<div
className={`mt-2 rounded-sm pl-2 ${
className={`mt-2 w-40 rounded-sm pl-2 ${
row.original.isNewRecord
? "bg-primary text-primary-foreground"
: "invisible"