mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-14 09:39:15 +00:00
Load demo img
This commit is contained in:
@@ -103,6 +103,16 @@ export default class Intro extends Component<Props, State> {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: remove this
|
||||||
|
const demo = demos[3];
|
||||||
|
fetch(demo.url)
|
||||||
|
.then((r) => r.blob())
|
||||||
|
.then((blob) =>
|
||||||
|
this.props.onFile!(
|
||||||
|
new File([blob], demo.filename, { type: blob.type }),
|
||||||
|
),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillUnmount() {
|
componentWillUnmount() {
|
||||||
|
|||||||
Reference in New Issue
Block a user