improve gamelog and prev info performance

This commit is contained in:
pa
2026-01-09 22:28:26 +09:00
committed by Natsumi
parent 97a0cddf68
commit 937294ebf7
3 changed files with 27 additions and 14 deletions

View File

@@ -116,6 +116,8 @@ export const createColumns = ({ getCreatedAt, onDelete, onDeletePrompt }) => {
header: () => t('table.gameLog.user'),
cell: ({ row }) => {
const original = row.original;
const isFriend = original.isFriend;
const isFavorite = original.isFavorite;
return (
<span>
{original.displayName ? (
@@ -126,10 +128,8 @@ export const createColumns = ({ getCreatedAt, onDelete, onDeletePrompt }) => {
{original.displayName}
</span>
) : null}
{gameLogIsFriend(original) ? (
<span>
{gameLogIsFavorite(original) ? '⭐' : '💚'}
</span>
{isFriend ? (
<span>{isFavorite ? '⭐' : '💚'}</span>
) : null}
</span>
);
@@ -139,9 +139,9 @@ export const createColumns = ({ getCreatedAt, onDelete, onDeletePrompt }) => {
id: 'detail',
header: () => t('table.gameLog.detail'),
enableSorting: false,
meta: {
class: 'min-w-[240px] overflow-hidden'
},
meta: {
class: 'min-w-[240px] overflow-hidden'
},
cell: ({ row }) => {
const original = row.original;
if (original.type === 'Location') {