mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Merge pull request #1738 from omnivore-app/fix/recent-email-mark-as
Revalidate after marking an email as article
This commit is contained in:
commit
341f88c4d6
1 changed files with 2 additions and 1 deletions
|
|
@ -131,7 +131,7 @@ const ViewRecentEmailModal = (
|
|||
}
|
||||
|
||||
export default function RecentEmails(): JSX.Element {
|
||||
const { recentEmails, isValidating } = useGetRecentEmailsQuery()
|
||||
const { recentEmails, revalidate, isValidating } = useGetRecentEmailsQuery()
|
||||
const [viewingEmail, setViewingEmail] = useState<RecentEmail | undefined>(
|
||||
undefined
|
||||
)
|
||||
|
|
@ -195,6 +195,7 @@ export default function RecentEmails(): JSX.Element {
|
|||
showSuccessToast('Marking email as article')
|
||||
try {
|
||||
await markEmailAsItemMutation(recentEmail.id)
|
||||
revalidate()
|
||||
} catch (err) {
|
||||
console.log('error marking as article: ', err)
|
||||
showErrorToast('Error marking item as article')
|
||||
|
|
|
|||
Loading…
Reference in a new issue