fix: add entryId to deps, try fix `isActive` judge

Signed-off-by: Innei <tukon479@gmail.com>
This commit is contained in:
Innei 2024-12-09 21:34:14 +08:00
parent 639b922ec8
commit 76fc17eddf
No known key found for this signature in database
GPG Key ID: 0F62D33977F021F7
1 changed files with 4 additions and 1 deletions

View File

@ -35,7 +35,10 @@ export const EntryItemWrapper: FC<
const { t } = useTranslation("common")
const isActive = useRouteParamsSelector(({ entryId }) => entryId === entry.entries.id)
const isActive = useRouteParamsSelector(
({ entryId }) => entryId === entry.entries.id,
[entry.entries.id],
)
const asRead = useAsRead(entry)
const hoverMarkUnread = useGeneralSettingKey("hoverMarkUnread")