diff options
author | jim <310223+jimmylee@users.noreply.github.com> | 2025-07-30 01:17:59 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-07-30 01:17:59 -0700 |
commit | 7caf2922dd3fb60f07c1ac0391231748a5c60531 (patch) | |
tree | af6683dc2857baf9ecfa48f6eef7c18592a4026d /src/view/com/util/Toast.tsx | |
parent | c2b8bdb33cb01c065357042c422d8fe1f69fea37 (diff) | |
parent | 18add1cff9eb36568439d8ea80180c36c1a30260 (diff) | |
download | voidsky-7caf2922dd3fb60f07c1ac0391231748a5c60531.tar.zst |
Merge pull request #8744 from internet-development/@APiligrim/update-toast
hot fix: imports for toast and alignment
Diffstat (limited to 'src/view/com/util/Toast.tsx')
-rw-r--r-- | src/view/com/util/Toast.tsx | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/view/com/util/Toast.tsx b/src/view/com/util/Toast.tsx index 2f8888bef..4c999ca2a 100644 --- a/src/view/com/util/Toast.tsx +++ b/src/view/com/util/Toast.tsx @@ -17,15 +17,16 @@ import Animated, { } from 'react-native-reanimated' import RootSiblings from 'react-native-root-siblings' import {useSafeAreaInsets} from 'react-native-safe-area-context' + import {useNonReactiveCallback} from '#/lib/hooks/useNonReactiveCallback' -import {atoms as a, useTheme} from '#/alf' -import {Text} from '#/components/Typography' import { - type ToastType, - TOAST_TYPE_TO_ICON, getToastTypeStyles, TOAST_ANIMATION_CONFIG, -} from './Toast.style' + TOAST_TYPE_TO_ICON, + type ToastType, +} from '#/view/com/util/Toast.style' +import {atoms as a, useTheme} from '#/alf' +import {Text} from '#/components/Typography' const TIMEOUT = 2e3 @@ -56,8 +57,9 @@ function Toast({ const [cardHeight, setCardHeight] = useState(0) const toastStyles = getToastTypeStyles(t) - const colors = toastStyles[type] - const IconComponent = TOAST_TYPE_TO_ICON[type] + const colors = toastStyles[type as keyof typeof toastStyles] + const IconComponent = + TOAST_TYPE_TO_ICON[type as keyof typeof TOAST_TYPE_TO_ICON] // for the exit animation to work on iOS the animated component // must not be the root component |