mirror of
https://github.com/strapi/strapi.git
synced 2025-08-31 04:03:50 +00:00
add tracking event to strapi awesome banner (#10701)
This commit is contained in:
parent
7a80bdaa8e
commit
c3eff49770
@ -1,29 +1,32 @@
|
||||
import React from 'react';
|
||||
import { FormattedMessage, useIntl } from 'react-intl';
|
||||
import { useGlobalContext } from 'strapi-helper-plugin';
|
||||
import Wrapper from './Wrapper';
|
||||
import LogoStrapi from '../../../assets/images/banner_strapi-rocket.png';
|
||||
|
||||
const PluginBanner = () => {
|
||||
const MarketplaceBanner = () => {
|
||||
const { formatMessage } = useIntl();
|
||||
const { emitEvent } = useGlobalContext();
|
||||
|
||||
return (
|
||||
<Wrapper>
|
||||
<img
|
||||
className="bannerImage"
|
||||
src={LogoStrapi}
|
||||
alt={formatMessage({ id: 'app.components.PluginBanner.image.alt' })}
|
||||
alt={formatMessage({ id: 'app.components.MarketplaceBanner.image.alt' })}
|
||||
/>
|
||||
<div>
|
||||
<div>
|
||||
<FormattedMessage id="app.components.PluginBanner" />
|
||||
<FormattedMessage id="app.components.MarketplaceBanner" />
|
||||
</div>
|
||||
<a
|
||||
href="https://github.com/strapi/awesome-strapi"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="bannerLink"
|
||||
onClick={() => emitEvent('didGoToStrapiAwesome')}
|
||||
>
|
||||
<FormattedMessage id="app.components.PluginBanner.link" />
|
||||
<FormattedMessage id="app.components.MarketplaceBanner.link" />
|
||||
<i className="fa fa-external-link-alt" />
|
||||
</a>
|
||||
</div>
|
||||
@ -31,4 +34,4 @@ const PluginBanner = () => {
|
||||
);
|
||||
};
|
||||
|
||||
export default PluginBanner;
|
||||
export default MarketplaceBanner;
|
@ -7,7 +7,7 @@ import { useFetchPluginsFromMarketPlace } from '../../hooks';
|
||||
import PageTitle from '../../components/PageTitle';
|
||||
import PluginCard from './PluginCard';
|
||||
import Wrapper from './Wrapper';
|
||||
import PluginBanner from './PluginBanner';
|
||||
import MarketplaceBanner from './MarketplaceBanner';
|
||||
|
||||
const MarketPlacePage = () => {
|
||||
const history = useHistory();
|
||||
@ -78,7 +78,7 @@ const MarketPlacePage = () => {
|
||||
id: 'app.components.InstallPluginPage.description',
|
||||
})}
|
||||
/>
|
||||
<PluginBanner />
|
||||
<MarketplaceBanner />
|
||||
<div className="row" style={{ paddingTop: '4.1rem' }}>
|
||||
{data.map(plugin => {
|
||||
return (
|
||||
|
@ -228,14 +228,14 @@
|
||||
"app.components.ListPluginsPage.title": "Plugins",
|
||||
"app.components.Logout.logout": "Logout",
|
||||
"app.components.Logout.profile": "Profile",
|
||||
"app.components.MarketplaceBanner": "Discover plugins built by the community, and many more awesome things to kickstart your project, on Strapi Awesome.",
|
||||
"app.components.MarketplaceBanner.image.alt": "a strapi rocket logo",
|
||||
"app.components.MarketplaceBanner.link": "Check it out now",
|
||||
"app.components.NotFoundPage.back": "Back to homepage",
|
||||
"app.components.NotFoundPage.description": "Not Found",
|
||||
"app.components.Official": "Official",
|
||||
"app.components.Onboarding.label.completed": "% completed",
|
||||
"app.components.Onboarding.title": "Get Started Videos",
|
||||
"app.components.PluginBanner": "Discover plugins built by the community, and many more awesome things to kickstart your project, on Strapi Awesome.",
|
||||
"app.components.PluginBanner.image.alt": "a strapi rocket logo",
|
||||
"app.components.PluginBanner.link": "Check it out now",
|
||||
"app.components.PluginCard.Button.label.download": "Download",
|
||||
"app.components.PluginCard.Button.label.install": "Already installed",
|
||||
"app.components.PluginCard.PopUpWarning.install.impossible.autoReload.needed": "The autoReload feature needs to be enabled. Please start your app with `yarn develop`.",
|
||||
|
@ -19557,10 +19557,10 @@ tar-stream@^2.0.1, tar-stream@^2.1.0, tar-stream@^2.1.2, tar-stream@^2.1.4:
|
||||
inherits "^2.0.3"
|
||||
readable-stream "^3.1.1"
|
||||
|
||||
tar@6.1.2:
|
||||
version "6.1.2"
|
||||
resolved "https://registry.yarnpkg.com/tar/-/tar-6.1.2.tgz#1f045a90a6eb23557a603595f41a16c57d47adc6"
|
||||
integrity sha512-EwKEgqJ7nJoS+s8QfLYVGMDmAsj+StbI2AM/RTHeUSsOw6Z8bwNBRv5z3CY0m7laC5qUAqruLX5AhMuc5deY3Q==
|
||||
tar@6.1.4:
|
||||
version "6.1.4"
|
||||
resolved "https://registry.yarnpkg.com/tar/-/tar-6.1.4.tgz#9f0722b772a5e00dba7d52e1923b37a7ec3799b3"
|
||||
integrity sha512-kcPWrO8S5ABjuZ/v1xQHP8xCEvj1dQ1d9iAb6Qs4jLYzaAIYWwST2IQpz7Ud8VNYRI+fGhFjrnzRKmRggKWg3g==
|
||||
dependencies:
|
||||
chownr "^2.0.0"
|
||||
fs-minipass "^2.0.0"
|
||||
|
Loading…
x
Reference in New Issue
Block a user