Snackbar defaults & copy undo (#233)

* Fix snackbar defaults. Fixes #205.

* Undo copy settings across.

* Oops

* Fixing stupid minification bug

* Something weird happened with the last commit
This commit is contained in:
Jake Archibald
2018-11-06 13:44:15 +00:00
committed by GitHub
parent 726c2f195a
commit e572b853e2
6 changed files with 108 additions and 110 deletions

View File

@@ -12,6 +12,7 @@ import artworkIcon from './imgs/demos/artwork-icon.jpg';
import deviceScreenIcon from './imgs/demos/device-screen-icon.jpg';
import logoIcon from './imgs/demos/logo-icon.png';
import * as style from './style.scss';
import SnackBarElement from '../../lib/SnackBar';
const demos = [
{
@@ -42,7 +43,7 @@ const demos = [
interface Props {
onFile: (file: File | Fileish) => void;
onError: (error: string) => void;
showSnack: SnackBarElement['showSnackbar'];
}
interface State {
fetchingDemoIndex?: number;
@@ -79,7 +80,7 @@ export default class Intro extends Component<Props, State> {
this.props.onFile(file);
} catch (err) {
this.setState({ fetchingDemoIndex: undefined });
this.props.onError("Couldn't fetch demo image");
this.props.showSnack("Couldn't fetch demo image");
}
}