1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-27 04:46:10 +01:00
metamask-extension/ui/pages/home/beta/beta-home-footer.component.js

53 lines
1.4 KiB
JavaScript
Raw Normal View History

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';
2021-09-08 22:08:23 +02:00
const BetaHomeFooter = () => {
const t = useI18nContext();
const trackEvent = useContext(MetaMetricsContext);
2021-09-08 22:08:23 +02:00
const SUPPORT_LINK =
'https://docs.google.com/forms/d/e/1FAIpQLSfpkpeVMvfFw_1CWzrs5M3TEqE9VPMSspLPJgk1u4ZyUkQRbg/viewform?usp=sharing';
2021-09-08 22:08:23 +02:00
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,
],
},
);
}}
>
2021-09-08 22:08:23 +02:00
{t('needHelpSubmitTicket')}
</a>{' '}
|{' '}
<a href={SUPPORT_LINK} target="_blank" rel="noopener noreferrer">
2021-09-08 22:08:23 +02:00
{t('needHelpFeedback')}
</a>
</>
);
};
export default BetaHomeFooter;