mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
add search support
This commit is contained in:
13
commafeed-client/src/components/content/FeedEntryTitle.tsx
Normal file
13
commafeed-client/src/components/content/FeedEntryTitle.tsx
Normal file
@@ -0,0 +1,13 @@
|
||||
import { Highlight } from "@mantine/core"
|
||||
import { useAppSelector } from "app/store"
|
||||
import { Entry } from "app/types"
|
||||
|
||||
export interface FeedEntryTitleProps {
|
||||
entry: Entry
|
||||
}
|
||||
|
||||
export function FeedEntryTitle(props: FeedEntryTitleProps) {
|
||||
const search = useAppSelector(state => state.entries.search)
|
||||
const keywords = search?.split(" ")
|
||||
return <Highlight highlight={keywords ?? ""}>{props.entry.title}</Highlight>
|
||||
}
|
||||
Reference in New Issue
Block a user