mattermost-mobile/app/screens/about/subtitle.tsx
Avinash Lingaloo 0ef1dd44ea
Gekidou about screen (#5591)
* Added about screen

* Remove TS error

* Needs clean up

* Testing login flow

* Converted About screen to functional component

* Improvements

* Sort imports

* Prevents double tapping

* Apply suggestions from code review

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>

* Code clean up

* Adding translation keys

* Added some keys

* Updated AppVersion component

* Missed translation key

Co-authored-by: Avinash Lingaloo <>
Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
2021-08-04 21:48:36 -07:00

49 lines
1.3 KiB
TypeScript

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import React from 'react';
import FormattedText from '@components/formatted_text';
import {useTheme} from '@context/theme';
import {t} from '@i18n';
import {changeOpacity, makeStyleSheetFromTheme} from '@utils/theme';
import type SystemModel from '@typings/database/models/servers/system';
type SubtitleProps = {
config: SystemModel;
}
const Subtitle = ({config}: SubtitleProps) => {
const theme = useTheme();
const style = getStyleSheet(theme);
let id = t('about.teamEditionSt');
let defaultMessage = 'All your team communication in one place, instantly searchable and accessible anywhere.';
if (config.value.BuildEnterpriseReady === 'true') {
id = t('about.enterpriseEditionSt');
defaultMessage = 'Modern communication from behind your firewall.';
}
return (
<FormattedText
id={id}
defaultMessage={defaultMessage}
style={style.subtitle}
testID='about.subtitle'
/>
);
};
const getStyleSheet = makeStyleSheetFromTheme((theme) => {
return {
subtitle: {
color: changeOpacity(theme.centerChannelColor, 0.5),
fontSize: 19,
marginBottom: 15,
},
};
});
export default Subtitle;