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

Implemented new dark theme

This commit is contained in:
Zhiyuan Zheng
2022-02-12 14:51:01 +01:00
parent 50141b2963
commit 6f0c318d06
108 changed files with 863 additions and 571 deletions

View File

@ -2,6 +2,7 @@ import apiInstance from '@api/instance'
import haptics from '@components/haptics'
import { displayMessage } from '@components/Message'
import queryClient from '@helpers/queryClient'
import { Theme } from '@utils/styles/themes'
import { AxiosError } from 'axios'
import i18next from 'i18next'
import { RefObject } from 'react'
@ -51,7 +52,7 @@ type MutationVarsProfileBase =
}
type MutationVarsProfile = MutationVarsProfileBase & {
mode: 'light' | 'dark'
theme: Theme
messageRef: RefObject<FlashMessage>
message: {
text: string
@ -133,7 +134,7 @@ const useProfileMutation = () => {
type: i18next.t(`screenTabs:${variables.message.text}`)
}),
...(err && { description: err.message }),
mode: variables.mode,
theme: variables.theme,
type: 'error'
})
}
@ -146,7 +147,7 @@ const useProfileMutation = () => {
message: i18next.t('screenTabs:me.profile.feedback.succeed', {
type: i18next.t(`screenTabs:${variables.message.text}`)
}),
mode: variables.mode,
theme: variables.theme,
type: 'success'
})
}