Compare commits

...

4 Commits

2 changed files with 6 additions and 4 deletions
Split View
  1. +4
    -2
      frontend/src/pages/posts/PostHistoryPage.tsx
  2. +2
    -2
      frontend/src/types.ts

+ 4
- 2
frontend/src/pages/posts/PostHistoryPage.tsx View File

@@ -71,7 +71,7 @@ export default (() => {
++rowsCnt
}
return (
<tr key={`${ change.timestamp }-${ change.post.id }-${ change.tag.id }`}
<tr key={`${ change.timestamp }-${ change.post.id }-${ change.tag?.id }`}
className={cn ('even:bg-gray-100 dark:even:bg-gray-700',
withPost && 'border-t')}>
{withPost && (
@@ -92,7 +92,9 @@ export default (() => {
</PrefetchLink>
</td>)}
<td className="p-2">
<TagLink tag={change.tag} withWiki={false} withCount={false}/>
{change.tag
? <TagLink tag={change.tag} withWiki={false} withCount={false}/>
: '(マスタ削除済のタグ) '}
{`を${ change.changeType === 'add' ? '記載' : '消除' }`}
</td>
<td className="p-2">


+ 2
- 2
frontend/src/types.ts View File

@@ -54,8 +54,8 @@ export type Post = {

export type PostTagChange = {
post: Post
tag: Tag
user?: User
tag: Tag | null
user: User | null
changeType: 'add' | 'remove'
timestamp: string }



Loading…
Cancel
Save