diff --git a/src/client/lazy-app/Compress/Options/index.tsx b/src/client/lazy-app/Compress/Options/index.tsx index 233b8c5a..4b06e016 100644 --- a/src/client/lazy-app/Compress/Options/index.tsx +++ b/src/client/lazy-app/Compress/Options/index.tsx @@ -5,6 +5,7 @@ import 'add-css:./style.css'; import { cleanSet, cleanMerge } from '../../util/clean-modify'; import type { SourceImage, OutputType } from '..'; +import type SnackBarElement from 'shared/initial-app/custom-els/snack-bar'; import { EncoderOptions, EncoderState, @@ -21,6 +22,7 @@ import { Options as ResizeOptionsComponent } from 'features/processors/resize/cl import { generateCliInvocation } from '../../util/cli-invocation-generator'; interface Props { + showSnack: SnackBarElement['showSnackbar']; mobileView: boolean; source?: SourceImage; encoderState?: EncoderState; @@ -111,8 +113,7 @@ export default class Options extends Component { ); navigator.clipboard.writeText(cliInvocation); } catch (e) { - // Show toast - console.error(e); + this.props.showSnack(e); } }; diff --git a/src/client/lazy-app/Compress/index.tsx b/src/client/lazy-app/Compress/index.tsx index bcd84242..eada89d5 100644 --- a/src/client/lazy-app/Compress/index.tsx +++ b/src/client/lazy-app/Compress/index.tsx @@ -786,7 +786,7 @@ export default class Compress extends Component { } render( - { onBack }: Props, + { onBack, showSnack }: Props, { loading, sides, source, mobileView, preprocessorState }: State, ) { const [leftSide, rightSide] = sides; @@ -794,6 +794,7 @@ export default class Compress extends Component { const options = sides.map((side, index) => (