forked from Ivasoft/mattermost-mobile
Clean up local config (#6804)
This commit is contained in:
@@ -118,15 +118,11 @@ const About = ({config, license}: AboutProps) => {
|
||||
}, []);
|
||||
|
||||
const handleAboutTeam = useCallback(preventDoubleTap(() => {
|
||||
return openURL(Config.AboutTeamURL);
|
||||
}), []);
|
||||
|
||||
const handleAboutEnterprise = useCallback(preventDoubleTap(() => {
|
||||
return openURL(Config.AboutEnterpriseURL);
|
||||
return openURL(Config.WebsiteURL);
|
||||
}), []);
|
||||
|
||||
const handlePlatformNotice = useCallback(preventDoubleTap(() => {
|
||||
return openURL(Config.PlatformNoticeURL);
|
||||
return openURL(Config.ServerNoticeURL);
|
||||
}), []);
|
||||
|
||||
const handleMobileNotice = useCallback(preventDoubleTap(() => {
|
||||
@@ -256,8 +252,7 @@ const About = ({config, license}: AboutProps) => {
|
||||
)}
|
||||
<LearnMore
|
||||
config={config}
|
||||
onHandleAboutEnterprise={handleAboutEnterprise}
|
||||
onHandleAboutTeam={handleAboutTeam}
|
||||
onPress={handleAboutTeam}
|
||||
/>
|
||||
{!MATTERMOST_BUNDLE_IDS.includes(DeviceInfo.getBundleId()) &&
|
||||
<FormattedText
|
||||
|
||||
@@ -31,24 +31,20 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => {
|
||||
|
||||
type LearnMoreProps = {
|
||||
config: ClientConfig;
|
||||
onHandleAboutEnterprise: () => void;
|
||||
onHandleAboutTeam: () => void;
|
||||
onPress: () => void;
|
||||
};
|
||||
|
||||
const LearnMore = ({config, onHandleAboutEnterprise, onHandleAboutTeam}: LearnMoreProps) => {
|
||||
const LearnMore = ({config, onPress}: LearnMoreProps) => {
|
||||
const theme = useTheme();
|
||||
const style = getStyleSheet(theme);
|
||||
|
||||
let id = t('about.teamEditionLearn');
|
||||
let defaultMessage = 'Join the Mattermost community at ';
|
||||
let onPress = onHandleAboutTeam;
|
||||
let url = Config.TeamEditionLearnURL;
|
||||
const url = Config.WebsiteURL;
|
||||
|
||||
if (config.BuildEnterpriseReady === 'true') {
|
||||
id = t('about.enterpriseEditionLearn');
|
||||
defaultMessage = 'Learn more about Enterprise Edition at ';
|
||||
onPress = onHandleAboutEnterprise;
|
||||
url = Config.EELearnURL;
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user