fix: omit show me in entry history

Signed-off-by: Innei <i@innei.in>
This commit is contained in:
Innei 2024-07-18 20:30:25 +08:00
parent a4097525c8
commit 409306b77c
No known key found for this signature in database
GPG Key ID: 0F62D33977F021F7
1 changed files with 3 additions and 3 deletions

View File

@ -20,13 +20,13 @@ export const EntryReadHistory: Component<{ entryId: string }> = ({
const entryHistory = useEntryReadHistory(entryId)
if (!entryHistory) return null
if (!me) return null
if (!entryHistory.userIds) return null
return (
<div className="flex items-center">
{[me.id]
.concat(entryHistory.userIds?.filter((id) => id !== me?.id) ?? []) // then others
{entryHistory.userIds
.filter((id) => id !== me?.id)
.slice(0, 10)
.map((userId, i) => (