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

@ -39,7 +39,7 @@ export interface Props {
}
const Screens: React.FC<Props> = ({ localCorrupt }) => {
const { i18n, t } = useTranslation('screens')
const { t } = useTranslation('screens')
const dispatch = useAppDispatch()
const instanceActive = useSelector(getInstanceActive)
const { colors, theme } = useTheme()
@ -70,8 +70,7 @@ const Screens: React.FC<Props> = ({ localCorrupt }) => {
displayMessage({
message: t('localCorrupt.message'),
description: localCorrupt.length ? localCorrupt : undefined,
type: 'error',
theme
type: 'danger'
})
// @ts-ignore
navigationRef.navigate('Screen-Tabs', {
@ -183,8 +182,7 @@ const Screens: React.FC<Props> = ({ localCorrupt }) => {
message: t('shareError.imageNotSupported', {
type: mime.split('/')[1]
}),
type: 'error',
theme
type: 'danger'
})
return
}
@ -196,8 +194,7 @@ const Screens: React.FC<Props> = ({ localCorrupt }) => {
message: t('shareError.videoNotSupported', {
type: mime.split('/')[1]
}),
type: 'error',
theme
type: 'danger'
})
return
}