replace all require(svgs) with esm import (#7948)
Signed-off-by: Kerry Archibald <kerrya@element.io>
This commit is contained in:
parent
522ad1aafb
commit
61cd463a3b
33 changed files with 104 additions and 54 deletions
|
@ -20,6 +20,7 @@ import MImageBody from './MImageBody';
|
|||
import { replaceableComponent } from "../../../utils/replaceableComponent";
|
||||
import { BLURHASH_FIELD } from "../../../ContentMessages";
|
||||
import Tooltip from "../elements/Tooltip";
|
||||
import ShowStickersSvg from '../../../../res/img/icons-show-stickers.svg';
|
||||
|
||||
@replaceableComponent("views.messages.MStickerBody")
|
||||
export default class MStickerBody extends MImageBody {
|
||||
|
@ -45,7 +46,7 @@ export default class MStickerBody extends MImageBody {
|
|||
// img onLoad hasn't fired yet.
|
||||
protected getPlaceholder(width: number, height: number): JSX.Element {
|
||||
if (this.props.mxEvent.getContent().info?.[BLURHASH_FIELD]) return super.getPlaceholder(width, height);
|
||||
return <img src={require("../../../../res/img/icons-show-stickers.svg")} width="75" height="75" />;
|
||||
return <img src={ShowStickersSvg} width="75" height="75" />;
|
||||
}
|
||||
|
||||
// Tooltip to show on mouse over
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue