-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add tracking event to strapi awesome banner #10701
Conversation
Codecov Report
@@ Coverage Diff @@
## master #10701 +/- ##
=======================================
Coverage 58.12% 58.12%
=======================================
Files 185 185
Lines 6429 6429
Branches 1395 1395
=======================================
Hits 3737 3737
Misses 2230 2230
Partials 462 462
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
import { FormattedMessage, useIntl } from 'react-intl'; | ||
import Wrapper from './Wrapper'; | ||
import LogoStrapi from '../../../assets/images/banner_strapi-rocket.png'; | ||
|
||
const PluginBanner = () => { | ||
const PluginBanner = ({ emitEvent }) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The emitEvent
function isn't used to define the Banner
component. IMO this component shouldn't depend on this kind of props. Can you get the emitEvent
from the global context please.
import { useGlobalContext } from 'strapi-helper-plugin';
const { emitEvent } = useGlobalContext();
emitEvent('didGoToStrapiAwesome');
a124be6
to
abb0a6b
Compare
abb0a6b
to
e122a33
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
What does it do?
Adds a tracking event to the strapi awesome marketplace banner