Create codemod for updating Toast calls to v2 (#10045)

This commit is contained in:
DS Boyce
2026-03-12 11:35:58 -07:00
committed by GitHub
parent 9c9970f680
commit 35cb2bcf94
62 changed files with 422 additions and 171 deletions
+7 -3
View File
@@ -13,12 +13,12 @@ import {
useProfileBlockMutationQueue,
useProfileQuery,
} from '#/state/queries/profile'
import * as Toast from '#/view/com/util/Toast'
import {atoms as a, platform, useBreakpoints, useTheme, web} from '#/alf'
import {Button, ButtonText} from '#/components/Button'
import * as Dialog from '#/components/Dialog'
import * as Toggle from '#/components/forms/Toggle'
import {Loader} from '#/components/Loader'
import * as Toast from '#/components/Toast'
import {Text} from '#/components/Typography'
import {IS_NATIVE} from '#/env'
@@ -135,7 +135,9 @@ function DoneStep({
}
},
onError: () => {
Toast.show(_(msg`Could not leave chat`), 'xmark')
Toast.show(_(msg`Could not leave chat`), {
type: 'error',
})
},
})
@@ -161,7 +163,9 @@ function DoneStep({
leaveConvo()
}
if (toastMsg) {
Toast.show(toastMsg, 'check')
Toast.show(toastMsg, {
type: 'success',
})
}
})
}