mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-10 03:51:25 +00:00
re-order beta key table columns
This commit is contained in:
1 parent
a2302a49f4
commit
65af11be18
1 file changed
+31
-31
@@ -119,6 +119,17 @@ export default function BetaKeysListPage() {
|
||||
return true;
|
||||
},
|
||||
}),
|
||||
columnHelper.accessor("created_at", {
|
||||
header: "Created Date",
|
||||
cell: info => new Date(info.getValue()).toLocaleDateString(),
|
||||
}),
|
||||
columnHelper.accessor("maybe_redeemed_at", {
|
||||
header: "Redemption Date",
|
||||
cell: info => {
|
||||
const value = info.getValue();
|
||||
return value ? new Date(value).toLocaleDateString() : "-";
|
||||
},
|
||||
}),
|
||||
columnHelper.accessor("key_value", {
|
||||
header: "Key",
|
||||
cell: info => {
|
||||
@@ -131,6 +142,26 @@ export default function BetaKeysListPage() {
|
||||
}
|
||||
},
|
||||
}),
|
||||
columnHelper.accessor("creator.username", {
|
||||
header: "Key Creator",
|
||||
cell: info => {
|
||||
const username = info.getValue();
|
||||
const userData = info.row.original.creator;
|
||||
const userEmailHash = userData?.gravatar_hash || "";
|
||||
return (
|
||||
<div className="d-flex gap-1 align-items-center">
|
||||
<Gravatar
|
||||
size={18}
|
||||
username={username}
|
||||
email_hash={userEmailHash}
|
||||
avatarIndex={userData?.default_avatar.image_index}
|
||||
backgroundIndex={userData?.default_avatar.color_index}
|
||||
/>
|
||||
<Link to={`/profile/${username}`}>{username}</Link>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
}),
|
||||
columnHelper.accessor("maybe_referrer.username", {
|
||||
header: "Referrer",
|
||||
cell: info => {
|
||||
@@ -176,37 +207,6 @@ export default function BetaKeysListPage() {
|
||||
);
|
||||
},
|
||||
}),
|
||||
columnHelper.accessor("created_at", {
|
||||
header: "Created Date",
|
||||
cell: info => new Date(info.getValue()).toLocaleDateString(),
|
||||
}),
|
||||
columnHelper.accessor("maybe_redeemed_at", {
|
||||
header: "Redemption Date",
|
||||
cell: info => {
|
||||
const value = info.getValue();
|
||||
return value ? new Date(value).toLocaleDateString() : "-";
|
||||
},
|
||||
}),
|
||||
columnHelper.accessor("creator.username", {
|
||||
header: "Key Creator",
|
||||
cell: info => {
|
||||
const username = info.getValue();
|
||||
const userData = info.row.original.creator;
|
||||
const userEmailHash = userData?.gravatar_hash || "";
|
||||
return (
|
||||
<div className="d-flex gap-1 align-items-center">
|
||||
<Gravatar
|
||||
size={18}
|
||||
username={username}
|
||||
email_hash={userEmailHash}
|
||||
avatarIndex={userData?.default_avatar.image_index}
|
||||
backgroundIndex={userData?.default_avatar.color_index}
|
||||
/>
|
||||
<Link to={`/profile/${username}`}>{username}</Link>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
}),
|
||||
];
|
||||
|
||||
const table = useReactTable({
|
||||
|
||||
Reference in new issue
Block a user