Revert "replace all require(.svg) with esm import" (#7969)
* Revert "replace all require(svgs) with esm import (#7948)"
This reverts commit 61cd463a3b
.
* add .default to svg icon inline requires
Signed-off-by: Kerry Archibald <kerrya@element.io>
* add shameful eslint ignore
Signed-off-by: Kerry Archibald <kerrya@element.io>
* format eslintrc
Signed-off-by: Kerry Archibald <kerrya@element.io>
* add missed MFileBody change
Signed-off-by: Kerry Archibald <kerrya@element.io>
* one more broken svg
Signed-off-by: Kerry Archibald <kerrya@element.io>
* and ignore it
Signed-off-by: Kerry Archibald <kerrya@element.io>
This commit is contained in:
parent
8a7ffb4f90
commit
d98a73b003
36 changed files with 119 additions and 131 deletions
|
@ -25,12 +25,6 @@ import { _t } from "../../../languageHandler";
|
|||
import { IdentityProviderBrand, IIdentityProvider, ISSOFlow } from "../../../Login";
|
||||
import AccessibleTooltipButton from "./AccessibleTooltipButton";
|
||||
import { mediaFromMxc } from "../../../customisations/Media";
|
||||
import AppleSvg from '../../../../res/img/element-icons/brands/apple.svg';
|
||||
import FacebookSvg from '../../../../res/img/element-icons/brands/facebook.svg';
|
||||
import GithubSvg from '../../../../res/img/element-icons/brands/github.svg';
|
||||
import GitlabSvg from '../../../../res/img/element-icons/brands/gitlab.svg';
|
||||
import GoogleSvg from '../../../../res/img/element-icons/brands/google.svg';
|
||||
import TwitterSvg from '../../../../res/img/element-icons/brands/twitter.svg';
|
||||
|
||||
interface ISSOButtonProps extends Omit<IProps, "flow"> {
|
||||
idp: IIdentityProvider;
|
||||
|
@ -40,17 +34,17 @@ interface ISSOButtonProps extends Omit<IProps, "flow"> {
|
|||
const getIcon = (brand: IdentityProviderBrand | string) => {
|
||||
switch (brand) {
|
||||
case IdentityProviderBrand.Apple:
|
||||
return AppleSvg;
|
||||
return require(`../../../../res/img/element-icons/brands/apple.svg`).default;
|
||||
case IdentityProviderBrand.Facebook:
|
||||
return FacebookSvg;
|
||||
return require(`../../../../res/img/element-icons/brands/facebook.svg`).default;
|
||||
case IdentityProviderBrand.Github:
|
||||
return GithubSvg;
|
||||
return require(`../../../../res/img/element-icons/brands/github.svg`).default;
|
||||
case IdentityProviderBrand.Gitlab:
|
||||
return GitlabSvg;
|
||||
return require(`../../../../res/img/element-icons/brands/gitlab.svg`).default;
|
||||
case IdentityProviderBrand.Google:
|
||||
return GoogleSvg;
|
||||
return require(`../../../../res/img/element-icons/brands/google.svg`).default;
|
||||
case IdentityProviderBrand.Twitter:
|
||||
return TwitterSvg;
|
||||
return require(`../../../../res/img/element-icons/brands/twitter.svg`).default;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue