mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Move bulk toast message to bottom right
This commit is contained in:
parent
d2421ab03d
commit
8d9440bee8
1 changed files with 12 additions and 4 deletions
|
|
@ -635,19 +635,27 @@ export function HomeFeedContainer(): JSX.Element {
|
|||
try {
|
||||
const res = await bulkActionMutation(action, query, expectedCount)
|
||||
if (res) {
|
||||
let successMessage: string | undefined = undefined
|
||||
switch (action) {
|
||||
case BulkAction.ARCHIVE:
|
||||
showSuccessToast('Items archived')
|
||||
successMessage = 'Link Archived'
|
||||
break
|
||||
case BulkAction.DELETE:
|
||||
showSuccessToast('Items deleted')
|
||||
successMessage = 'Items deleted'
|
||||
break
|
||||
}
|
||||
if (successMessage) {
|
||||
showSuccessToast(successMessage, { position: 'bottom-right' })
|
||||
}
|
||||
} else {
|
||||
showErrorToast('Error performing bulk action')
|
||||
showErrorToast('Error performing bulk action', {
|
||||
position: 'bottom-right',
|
||||
})
|
||||
}
|
||||
} catch (err) {
|
||||
showErrorToast('Error performing bulk action')
|
||||
showErrorToast('Error performing bulk action', {
|
||||
position: 'bottom-right',
|
||||
})
|
||||
}
|
||||
mutate()
|
||||
})()
|
||||
|
|
|
|||
Loading…
Reference in a new issue