mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
* Fix support link alignment * Fix lint issues * Fix workflows --------- Co-authored-by: Nidhi Kumari <nidhi.kumari@consensys.net> Co-authored-by: David Walsh <davidwalsh83@gmail.com>
This commit is contained in:
parent
798a9b0e60
commit
29ad914dc9
@ -378,6 +378,23 @@ export default class Home extends PureComponent {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
///: BEGIN:ONLY_INCLUDE_IN(build-main)
|
||||||
|
onSupportLinkClick = () => {
|
||||||
|
this.context.trackEvent(
|
||||||
|
{
|
||||||
|
category: MetaMetricsEventCategory.Home,
|
||||||
|
event: MetaMetricsEventName.SupportLinkClicked,
|
||||||
|
properties: {
|
||||||
|
url: SUPPORT_LINK,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
contextPropsIntoEventProperties: [MetaMetricsContextProp.PageTitle],
|
||||||
|
},
|
||||||
|
);
|
||||||
|
};
|
||||||
|
///: END:ONLY_INCLUDE_IN
|
||||||
|
|
||||||
onOutdatedBrowserWarningClose = () => {
|
onOutdatedBrowserWarningClose = () => {
|
||||||
const { setOutdatedBrowserWarningLastShown } = this.props;
|
const { setOutdatedBrowserWarningLastShown } = this.props;
|
||||||
setOutdatedBrowserWarningLastShown(new Date().getTime());
|
setOutdatedBrowserWarningLastShown(new Date().getTime());
|
||||||
@ -778,7 +795,7 @@ export default class Home extends PureComponent {
|
|||||||
completedOnboarding && !onboardedInThisUISession && showTermsOfUsePopup;
|
completedOnboarding && !onboardedInThisUISession && showTermsOfUsePopup;
|
||||||
///: END:ONLY_INCLUDE_IN
|
///: END:ONLY_INCLUDE_IN
|
||||||
|
|
||||||
///: BEGIN:ONLY_INCLUDE_IN(build-main,build-mmi)
|
///: BEGIN:ONLY_INCLUDE_IN(build-mmi)
|
||||||
// The style in activity screen for support is different
|
// The style in activity screen for support is different
|
||||||
const activitySupportDisplayStyle =
|
const activitySupportDisplayStyle =
|
||||||
defaultHomeActiveTabName === 'activity'
|
defaultHomeActiveTabName === 'activity'
|
||||||
@ -884,31 +901,6 @@ export default class Home extends PureComponent {
|
|||||||
history.push(`${ASSET_ROUTE}/${asset}`)
|
history.push(`${ASSET_ROUTE}/${asset}`)
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
</Box>
|
|
||||||
</Tab>
|
|
||||||
{
|
|
||||||
///: BEGIN:ONLY_INCLUDE_IN(build-main,build-beta,build-flask)
|
|
||||||
<Tab
|
|
||||||
activeClassName="home__tab--active"
|
|
||||||
className="home__tab"
|
|
||||||
data-testid="home__nfts-tab"
|
|
||||||
name={this.context.t('nfts')}
|
|
||||||
tabKey="nfts"
|
|
||||||
>
|
|
||||||
<NftsTab />
|
|
||||||
</Tab>
|
|
||||||
///: END:ONLY_INCLUDE_IN
|
|
||||||
}
|
|
||||||
<Tab
|
|
||||||
activeClassName="home__tab--active"
|
|
||||||
className="home__tab"
|
|
||||||
data-testid="home__activity-tab"
|
|
||||||
name={t('activity')}
|
|
||||||
tabKey="activity"
|
|
||||||
>
|
|
||||||
<TransactionList />
|
|
||||||
</Tab>
|
|
||||||
</Tabs>
|
|
||||||
{
|
{
|
||||||
///: BEGIN:ONLY_INCLUDE_IN(build-main)
|
///: BEGIN:ONLY_INCLUDE_IN(build-main)
|
||||||
<ButtonLink
|
<ButtonLink
|
||||||
@ -917,32 +909,77 @@ export default class Home extends PureComponent {
|
|||||||
data-testid="need-help-link"
|
data-testid="need-help-link"
|
||||||
href={SUPPORT_LINK}
|
href={SUPPORT_LINK}
|
||||||
display={Display.Flex}
|
display={Display.Flex}
|
||||||
justifyContent={activitySupportDisplayStyle.justifyContent}
|
justifyContent={JustifyContent.flexStart}
|
||||||
paddingLeft={activitySupportDisplayStyle.paddingLeft}
|
paddingLeft={4}
|
||||||
marginBottom={activitySupportDisplayStyle.marginBottom}
|
marginBottom={4}
|
||||||
marginTop={activitySupportDisplayStyle.marginTop}
|
onClick={this.onSupportLinkClick}
|
||||||
onClick={() => {
|
|
||||||
this.context.trackEvent(
|
|
||||||
{
|
|
||||||
category: MetaMetricsEventCategory.Home,
|
|
||||||
event: MetaMetricsEventName.SupportLinkClicked,
|
|
||||||
properties: {
|
|
||||||
url: SUPPORT_LINK,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
contextPropsIntoEventProperties: [
|
|
||||||
MetaMetricsContextProp.PageTitle,
|
|
||||||
],
|
|
||||||
},
|
|
||||||
);
|
|
||||||
}}
|
|
||||||
externalLink
|
externalLink
|
||||||
>
|
>
|
||||||
{t('needHelpLinkText')}
|
{t('needHelpLinkText')}
|
||||||
</ButtonLink>
|
</ButtonLink>
|
||||||
///: END:ONLY_INCLUDE_IN
|
///: END:ONLY_INCLUDE_IN
|
||||||
}
|
}
|
||||||
|
</Box>
|
||||||
|
</Tab>
|
||||||
|
<Tab
|
||||||
|
activeClassName="home__tab--active"
|
||||||
|
className="home__tab"
|
||||||
|
data-testid="home__nfts-tab"
|
||||||
|
name={this.context.t('nfts')}
|
||||||
|
tabKey="nfts"
|
||||||
|
>
|
||||||
|
{
|
||||||
|
///: BEGIN:ONLY_INCLUDE_IN(build-main,build-beta,build-flask)
|
||||||
|
<NftsTab />
|
||||||
|
///: END:ONLY_INCLUDE_IN
|
||||||
|
}
|
||||||
|
{
|
||||||
|
///: BEGIN:ONLY_INCLUDE_IN(build-main)
|
||||||
|
<ButtonLink
|
||||||
|
size={Size.MD}
|
||||||
|
startIconName={IconName.MessageQuestion}
|
||||||
|
data-testid="need-help-link"
|
||||||
|
href={SUPPORT_LINK}
|
||||||
|
display={Display.Flex}
|
||||||
|
justifyContent={JustifyContent.flexStart}
|
||||||
|
paddingLeft={4}
|
||||||
|
marginBottom={4}
|
||||||
|
onClick={this.onSupportLinkClick}
|
||||||
|
externalLink
|
||||||
|
>
|
||||||
|
{t('needHelpLinkText')}
|
||||||
|
</ButtonLink>
|
||||||
|
///: END:ONLY_INCLUDE_IN
|
||||||
|
}
|
||||||
|
</Tab>
|
||||||
|
<Tab
|
||||||
|
activeClassName="home__tab--active"
|
||||||
|
className="home__tab"
|
||||||
|
data-testid="home__activity-tab"
|
||||||
|
name={t('activity')}
|
||||||
|
tabKey="activity"
|
||||||
|
>
|
||||||
|
<TransactionList />
|
||||||
|
{
|
||||||
|
///: BEGIN:ONLY_INCLUDE_IN(build-main)
|
||||||
|
<ButtonLink
|
||||||
|
size={Size.MD}
|
||||||
|
startIconName={IconName.MessageQuestion}
|
||||||
|
data-testid="need-help-link"
|
||||||
|
href={SUPPORT_LINK}
|
||||||
|
display={Display.Flex}
|
||||||
|
justifyContent={JustifyContent.center}
|
||||||
|
marginBottom={4}
|
||||||
|
marginTop={4}
|
||||||
|
onClick={this.onSupportLinkClick}
|
||||||
|
externalLink
|
||||||
|
>
|
||||||
|
{t('needHelpLinkText')}
|
||||||
|
</ButtonLink>
|
||||||
|
///: END:ONLY_INCLUDE_IN
|
||||||
|
}
|
||||||
|
</Tab>
|
||||||
|
</Tabs>
|
||||||
{
|
{
|
||||||
///: BEGIN:ONLY_INCLUDE_IN(build-mmi)
|
///: BEGIN:ONLY_INCLUDE_IN(build-mmi)
|
||||||
<InstitutionalHomeFooter
|
<InstitutionalHomeFooter
|
||||||
|
Loading…
x
Reference in New Issue
Block a user