Create codemod for updating Toast calls to v2 (#10045)
This commit is contained in:
@@ -5,10 +5,10 @@ import {useLingui} from '@lingui/react'
|
||||
import {Trans} from '@lingui/react/macro'
|
||||
|
||||
import {logger} from '#/logger'
|
||||
import * as Toast from '#/view/com/util/Toast'
|
||||
import {atoms as a} from '#/alf'
|
||||
import {Button, ButtonIcon, ButtonText} from '#/components/Button'
|
||||
import {CC_Stroke2_Corner0_Rounded as CCIcon} from '#/components/icons/CC'
|
||||
import * as Toast from '#/components/Toast'
|
||||
|
||||
export function SubtitleFilePicker({
|
||||
onSelectFile,
|
||||
|
||||
@@ -7,8 +7,8 @@ import {type CompressedVideo} from '#/lib/media/video/types'
|
||||
import {clamp} from '#/lib/numbers'
|
||||
import {useAutoplayDisabled} from '#/state/preferences'
|
||||
import {ExternalEmbedRemoveBtn} from '#/view/com/composer/ExternalEmbedRemoveBtn'
|
||||
import * as Toast from '#/view/com/util/Toast'
|
||||
import {atoms as a} from '#/alf'
|
||||
import * as Toast from '#/components/Toast'
|
||||
import {PlayButtonIcon} from '#/components/video/PlayButtonIcon'
|
||||
|
||||
export function VideoPreview({
|
||||
@@ -63,7 +63,9 @@ export function VideoPreview({
|
||||
playsInline
|
||||
onError={err => {
|
||||
console.error('Error loading video', err)
|
||||
Toast.show(_(msg`Could not process your video`), 'xmark')
|
||||
Toast.show(_(msg`Could not process your video`), {
|
||||
type: 'error',
|
||||
})
|
||||
clear()
|
||||
}}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user