mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-29 23:58:06 +01:00
1304ec7af5
We want to convert NetworkController to TypeScript in order to be able to compare differences in the controller between in this repo and the core repo. To do this, however, we need to convert the dependencies of the controller to TypeScript. As a part of this effort, this commit converts `shared/constants/metametrics` to TypeScript. Note that simple objects have been largely replaced with enums. There are some cases where I even split up some of these objects into multiple enums. Co-authored-by: Mark Stacey <markjstacey@gmail.com>
53 lines
1.4 KiB
JavaScript
53 lines
1.4 KiB
JavaScript
import React, { useContext } from 'react';
|
|
|
|
import { SUPPORT_REQUEST_LINK } from '../../../helpers/constants/common';
|
|
import { useI18nContext } from '../../../hooks/useI18nContext';
|
|
import {
|
|
MetaMetricsContextProp,
|
|
MetaMetricsEventCategory,
|
|
MetaMetricsEventName,
|
|
} from '../../../../shared/constants/metametrics';
|
|
import { MetaMetricsContext } from '../../../contexts/metametrics';
|
|
|
|
const BetaHomeFooter = () => {
|
|
const t = useI18nContext();
|
|
const trackEvent = useContext(MetaMetricsContext);
|
|
|
|
const SUPPORT_LINK =
|
|
'https://docs.google.com/forms/d/e/1FAIpQLSfpkpeVMvfFw_1CWzrs5M3TEqE9VPMSspLPJgk1u4ZyUkQRbg/viewform?usp=sharing';
|
|
|
|
return (
|
|
<>
|
|
<a
|
|
target="_blank"
|
|
rel="noopener noreferrer"
|
|
href={SUPPORT_LINK}
|
|
onClick={() => {
|
|
trackEvent(
|
|
{
|
|
category: MetaMetricsEventCategory.Footer,
|
|
event: MetaMetricsEventName.SupportLinkClicked,
|
|
properties: {
|
|
url: SUPPORT_REQUEST_LINK,
|
|
},
|
|
},
|
|
{
|
|
contextPropsIntoEventProperties: [
|
|
MetaMetricsContextProp.PageTitle,
|
|
],
|
|
},
|
|
);
|
|
}}
|
|
>
|
|
{t('needHelpSubmitTicket')}
|
|
</a>{' '}
|
|
|{' '}
|
|
<a href={SUPPORT_LINK} target="_blank" rel="noopener noreferrer">
|
|
{t('needHelpFeedback')}
|
|
</a>
|
|
</>
|
|
);
|
|
};
|
|
|
|
export default BetaHomeFooter;
|