fix: reset feed search, close #701
This commit is contained in:
parent
a60ea08fca
commit
a060986fa3
|
|
@ -345,7 +345,11 @@ export const ListFeedsModalContent = ({ id }: { id: string }) => {
|
|||
const { t } = useTranslation("settings")
|
||||
|
||||
const [feedSearchFor, setFeedSearchFor] = useState("")
|
||||
const addMutation = useAddFeedToFeedList()
|
||||
const addMutation = useAddFeedToFeedList({
|
||||
onSuccess: () => {
|
||||
setFeedSearchFor("")
|
||||
},
|
||||
})
|
||||
|
||||
const allFeeds = useSubscriptionStore((store) => {
|
||||
const feedInfo = [] as { title: string; id: string }[]
|
||||
|
|
|
|||
|
|
@ -62,7 +62,10 @@ export const useFeedHeaderTitle = () => {
|
|||
}
|
||||
}
|
||||
|
||||
export const useAddFeedToFeedList = (options?: { onSuccess: () => void; onError: () => void }) => {
|
||||
export const useAddFeedToFeedList = (options?: {
|
||||
onSuccess?: () => void
|
||||
onError?: () => void
|
||||
}) => {
|
||||
const { t } = useTranslation("settings")
|
||||
return useMutation({
|
||||
mutationFn: async (
|
||||
|
|
|
|||
Loading…
Reference in New Issue