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 }) => { 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 skillId = row.original.skillId;
const isClear = row.original.isClear; const isClear = row.original.isClear;
let isSuccessText = ""; let isSuccessText = "";
if (isClear === 1 && skillId === 100010) { if (isClear === 1 && skillId === 100010) {
isSuccessText = "Limit Break 【SUN】"; isSuccessText = "Limit Break";
} else if (isClear === 1 && skillId === 100011) { } else if (isClear === 1 && skillId === 100011) {
isSuccessText = "Limit Break++ "; isSuccessText = "Limit Break++ ";
} else if (isClear === 1 && skillId === 100012) { } else if (isClear === 1 && skillId === 100012) {
@ -110,8 +111,12 @@ export const columns: ColumnDef<chunithm>[] = [
isSuccessText = "Absolute++ 【LMN】"; isSuccessText = "Absolute++ 【LMN】";
} else if (isClear === 1 && skillId === 102009) { } else if (isClear === 1 && skillId === 102009) {
isSuccessText = "Catastropy【LMN】"; isSuccessText = "Catastropy【LMN】";
} else if (isClear === 1 && skillId === 800003) {
isSuccessText = "Clear";
} else if (isClear === 0) { } else if (isClear === 0) {
isSuccessText = "Failed"; isSuccessText = "Failed";
} else if (isClear === 1) {
isSuccessText = "Clear";
} else { } else {
isSuccessText = isClear?.toString() ?? ""; isSuccessText = isClear?.toString() ?? "";
} }
@ -119,11 +124,11 @@ export const columns: ColumnDef<chunithm>[] = [
return ( return (
<div> <div>
{row.original.score?.toLocaleString()} {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} {isSuccessText}
</div> </div>
<div <div
className={`mt-2 rounded-sm pl-2 ${ className={`mt-2 w-40 rounded-sm pl-2 ${
row.original.isNewRecord row.original.isNewRecord
? "bg-primary text-primary-foreground" ? "bg-primary text-primary-foreground"
: "invisible" : "invisible"