add search support

This commit is contained in:
Athou
2022-10-27 16:25:32 +02:00
parent 9252042c99
commit d187c23a77
10 changed files with 144 additions and 34 deletions

View 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>
}