削除タグが履歴で取得されるとフロントが落ちるバグ(#290) (#292)
#290 #290 'frontend/src/pages/posts/PostHistoryPage.tsx' を更新 'frontend/src/types.ts' を更新 Co-authored-by: miteruzo <miteruzo@naver.com> Reviewed-on: #292
This commit was merged in pull request #292.
This commit is contained in:
@@ -71,7 +71,7 @@ export default (() => {
|
|||||||
++rowsCnt
|
++rowsCnt
|
||||||
}
|
}
|
||||||
return (
|
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',
|
className={cn ('even:bg-gray-100 dark:even:bg-gray-700',
|
||||||
withPost && 'border-t')}>
|
withPost && 'border-t')}>
|
||||||
{withPost && (
|
{withPost && (
|
||||||
@@ -92,7 +92,9 @@ export default (() => {
|
|||||||
</PrefetchLink>
|
</PrefetchLink>
|
||||||
</td>)}
|
</td>)}
|
||||||
<td className="p-2">
|
<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' ? '記載' : '消除' }`}
|
{`を${ change.changeType === 'add' ? '記載' : '消除' }`}
|
||||||
</td>
|
</td>
|
||||||
<td className="p-2">
|
<td className="p-2">
|
||||||
|
|||||||
@@ -54,8 +54,8 @@ export type Post = {
|
|||||||
|
|
||||||
export type PostTagChange = {
|
export type PostTagChange = {
|
||||||
post: Post
|
post: Post
|
||||||
tag: Tag
|
tag: Tag | null
|
||||||
user?: User
|
user: User | null
|
||||||
changeType: 'add' | 'remove'
|
changeType: 'add' | 'remove'
|
||||||
timestamp: string }
|
timestamp: string }
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user