mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2026-05-19 02:07:48 +00:00
* feat(dynamic-branding) sdk customization * feat(dynamic-branding) unsetDynamicBranding when we disconnect * feat(dynamic-branding) added branding colors to conference * feat(dynamic-branding) extracted logger to its own file * feat(dynamic-branding) reverted style change * feat(dynamic-branding) unset branding if connection failed * feat(dynamic-branding) removed index.js, updated imports, added ImageBackground component * feat(dynamic-branding) created logger feature object * feat(dynamic-branding) moved brandingStyles to mapStateToProps, used SvGUri * feat(dynamic-branding) created BrandingImageBackground component, fixed styles * feat(dynamic-branding) moved BrandingImageBackground to dynamic-branding feature * feat(dynamic-branding) fixed linter * feat(dynamic-branding) added style comment
46 lines
1.1 KiB
TypeScript
46 lines
1.1 KiB
TypeScript
import React from 'react';
|
|
import { Image } from 'react-native';
|
|
import { SvgUri } from 'react-native-svg';
|
|
|
|
import styles from './styles';
|
|
|
|
|
|
interface Props {
|
|
uri: any;
|
|
}
|
|
|
|
/**
|
|
* Component that displays a branding background image.
|
|
*
|
|
* @param {Props} props - The props of the component.
|
|
* @returns {ReactElement}
|
|
*/
|
|
const BrandingImageBackground: React.FC<Props> = ({ uri }:Props) => {
|
|
const imageType = uri?.substr(uri.lastIndexOf('/') + 1);
|
|
const imgSrc = uri ? uri : undefined;
|
|
|
|
let backgroundImage;
|
|
|
|
if (imageType?.includes('.svg')) {
|
|
backgroundImage
|
|
= (
|
|
<SvgUri
|
|
height = '100%'
|
|
style = { styles.brandingImageBackgroundSvg }
|
|
uri = { imgSrc }
|
|
width = '100%' />
|
|
);
|
|
} else {
|
|
backgroundImage
|
|
= (
|
|
<Image
|
|
source = {{ uri: imgSrc }}
|
|
style = { styles.brandingImageBackground } />
|
|
);
|
|
}
|
|
|
|
return backgroundImage;
|
|
};
|
|
|
|
export default BrandingImageBackground;
|