Skip to content

Commit

Permalink
fix: update snapshot
Browse files Browse the repository at this point in the history
Signed-off-by: Innei <i@innei.in>
  • Loading branch information
Innei committed Jun 19, 2024
1 parent 132758d commit a37628e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/renderer/src/lib/route-builder.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,23 +118,23 @@ describe("test route builder", () => {
"children": [
{
"handle": {
"fs": "./pages/(external)/(with-layout)/feed/[:id]/index/",
"fs": "./pages/(external)/(with-layout)/feed/[id]/index/",
"fullPath": "/feed/:id/",
},
"lazy": [Function],
"path": "",
},
],
"handle": {
"fs": "./pages/(external)/(with-layout)/feed/[:id]/layout",
"fs": "./pages/(external)/(with-layout)/feed/[id]/layout",
"fullPath": "/feed/:id",
},
"lazy": [Function],
"path": "",
},
],
"handle": {
"fs": "./pages/(external)/(with-layout)/feed/[:id]/:id",
"fs": "./pages/(external)/(with-layout)/feed/[id]/:id",
"fullPath": "/feed/:id",
},
"path": ":id",
Expand Down
6 changes: 3 additions & 3 deletions src/renderer/src/modules/entry-column/item.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useAsRead, useBizQuery, useEntryActions } from "@renderer/hooks"
import { useNavigateEntry } from "@renderer/hooks/biz/useNavigateEntry"
import { useRouteEntryId } from "@renderer/hooks/biz/useRouteParams"
import { useRouteParamsSelector } from "@renderer/hooks/biz/useRouteParams"
import { views } from "@renderer/lib/constants"
import { FeedViewType } from "@renderer/lib/enum"
import { showNativeMenu } from "@renderer/lib/native-menu"
Expand Down Expand Up @@ -41,7 +41,7 @@ function EntryItemImpl({ entry, view }: { entry: EntryModel, view?: number }) {
},
)

const currentEntryId = useRouteEntryId()
const isActive = useRouteParamsSelector(({ entryId }) => entryId === entry.entries.id)

const asRead = useAsRead(entry)

Expand Down Expand Up @@ -120,7 +120,7 @@ function EntryItemImpl({ entry, view }: { entry: EntryModel, view?: number }) {
className={cn(
"rounded-md bg-theme-background transition-colors",
!views[view || 0].wideMode &&
currentEntryId === entry.entries.id &&
isActive &&
"bg-theme-item-active",
asRead ? "text-zinc-500/90" : "text-zinc-900 dark:text-white/90",
)}
Expand Down

0 comments on commit a37628e

Please sign in to comment.