1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00

Added push server error messaging

Also clean up <Message> component
This commit is contained in:
xmflsct
2022-12-05 23:15:07 +01:00
parent c4f825e087
commit 1f2e34e9da
24 changed files with 223 additions and 769 deletions

View File

@ -1,7 +1,6 @@
import { displayMessage } from '@components/Message'
import { QueryKeyTimeline, useTimelineMutation } from '@utils/queryHooks/timeline'
import { getInstanceUrl } from '@utils/slices/instancesSlice'
import { useTheme } from '@utils/styles/ThemeManager'
import { useTranslation } from 'react-i18next'
import { Alert } from 'react-native'
import { useQueryClient } from 'react-query'
@ -18,14 +17,12 @@ const menuInstance = ({
}): ContextMenu[][] => {
if (!status || !queryKey) return []
const { theme } = useTheme()
const { t } = useTranslation('componentContextMenu')
const queryClient = useQueryClient()
const mutation = useTimelineMutation({
onSettled: () => {
displayMessage({
theme,
type: 'success',
message: t('common:message.success.message', {
function: t(`instance.block.action`, { instance })