mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
486ade85f3
* fixed connect mmi button several issues * Fixed snapshot * Improved multiple things * running yarn dedupe * Update LavaMoat policies * For some reason, this.mmiConfigurationController.store.mmiConfiguration?.portfolio sometimes is undefined, added [] if null. Moved the || {} outside the find method * minor improvements --------- Co-authored-by: MetaMask Bot <metamaskbot@users.noreply.github.com>
60 lines
1.9 KiB
JavaScript
60 lines
1.9 KiB
JavaScript
import React, { useContext } from 'react';
|
|
import PropTypes from 'prop-types';
|
|
import { SUPPORT_LINK } from '../../../../shared/lib/ui-utils';
|
|
import { useI18nContext } from '../../../hooks/useI18nContext';
|
|
import {
|
|
MetaMetricsContextProp,
|
|
MetaMetricsEventCategory,
|
|
MetaMetricsEventName,
|
|
} from '../../../../shared/constants/metametrics';
|
|
import { MetaMetricsContext } from '../../../contexts/metametrics';
|
|
import { ButtonLink, IconName } from '../../../components/component-library';
|
|
import { Display, Size } from '../../../helpers/constants/design-system';
|
|
|
|
const InstitutionalHomeFooter = ({ activitySupportDisplayStyle }) => {
|
|
const t = useI18nContext();
|
|
const trackEvent = useContext(MetaMetricsContext);
|
|
|
|
return (
|
|
<ButtonLink
|
|
size={Size.MD}
|
|
startIconName={IconName.MessageQuestion}
|
|
data-testid="need-help-link"
|
|
href={SUPPORT_LINK}
|
|
display={Display.Flex}
|
|
justifyContent={activitySupportDisplayStyle.justifyContent}
|
|
paddingLeft={activitySupportDisplayStyle.paddingLeft}
|
|
marginBottom={activitySupportDisplayStyle.marginBottom}
|
|
marginTop={activitySupportDisplayStyle.marginTop}
|
|
onClick={() => {
|
|
trackEvent(
|
|
{
|
|
category: MetaMetricsEventCategory.Home,
|
|
event: MetaMetricsEventName.SupportLinkClicked,
|
|
properties: {
|
|
url: SUPPORT_LINK,
|
|
},
|
|
},
|
|
{
|
|
contextPropsIntoEventProperties: [MetaMetricsContextProp.PageTitle],
|
|
},
|
|
);
|
|
}}
|
|
externalLink
|
|
>
|
|
{`${t('appNameMmi')} ${t('support').toLowerCase()}`}
|
|
</ButtonLink>
|
|
);
|
|
};
|
|
|
|
InstitutionalHomeFooter.propTypes = {
|
|
activitySupportDisplayStyle: PropTypes.shape({
|
|
justifyContent: PropTypes.string.isRequired,
|
|
paddingLeft: PropTypes.number,
|
|
marginBottom: PropTypes.number,
|
|
marginTop: PropTypes.number,
|
|
}).isRequired,
|
|
};
|
|
|
|
export default InstitutionalHomeFooter;
|