|
|
|
@@ -10,6 +10,7 @@ import MainArea from '@/components/layout/MainArea' |
|
|
|
import { SITE_TITLE } from '@/config' |
|
|
|
import { fetchPostChanges } from '@/lib/posts' |
|
|
|
import { postsKeys } from '@/lib/queryKeys' |
|
|
|
import { cn } from '@/lib/utils' |
|
|
|
|
|
|
|
import type { FC } from 'react' |
|
|
|
|
|
|
|
@@ -44,7 +45,7 @@ export default (() => { |
|
|
|
{loading ? 'Loading...' : ( |
|
|
|
<> |
|
|
|
<table className="table-auto w-full border-collapse"> |
|
|
|
<thead> |
|
|
|
<thead className="border-b-2 border-black dark:border-white"> |
|
|
|
<tr> |
|
|
|
<th className="p-2 text-left">投稿</th> |
|
|
|
<th className="p-2 text-left">変更</th> |
|
|
|
@@ -64,9 +65,12 @@ 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 && ( |
|
|
|
<td className="align-top" rowSpan={rowsCnt}> |
|
|
|
<td className="align-top p-2 bg-white dark:bg-[#242424] border-r" |
|
|
|
rowSpan={rowsCnt}> |
|
|
|
<PrefetchLink to={`/posts/${ change.post.id }`}> |
|
|
|
<img src={change.post.thumbnail || change.post.thumbnailBase || undefined} |
|
|
|
alt={change.post.title || change.post.url} |
|
|
|
@@ -74,11 +78,11 @@ export default (() => { |
|
|
|
className="w-40"/> |
|
|
|
</PrefetchLink> |
|
|
|
</td>)} |
|
|
|
<td> |
|
|
|
<td className="p-2"> |
|
|
|
<TagLink tag={change.tag} withWiki={false} withCount={false}/> |
|
|
|
{`を${ change.changeType === 'add' ? '記載' : '消除' }`} |
|
|
|
</td> |
|
|
|
<td> |
|
|
|
<td className="p-2"> |
|
|
|
{change.user ? ( |
|
|
|
<PrefetchLink to={`/users/${ change.user.id }`}> |
|
|
|
{change.user.name} |
|
|
|
|