Skip to content

Commit

Permalink
Add analytics event to docs link
Browse files Browse the repository at this point in the history
  • Loading branch information
markrickert committed Jan 23, 2024
1 parent 017c3aa commit 63aa741
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion apps/reactotron-app/src/renderer/pages/home/welcome.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { shell } from "electron"
import styled from "styled-components"
import { reactotronLogo } from "../../images"
import { EmptyState } from "reactotron-core-ui"
import { useAnalytics } from "../../util/analyticsHelpers"

const WelcomeText = styled.div`
font-size: 1.25em;
Expand All @@ -26,11 +27,15 @@ function openDocs() {
}

function Welcome() {
const { sendExternalLinkAnalyticsEvent } = useAnalytics()

return (
<EmptyState image={reactotronLogo} title="Welcome to Reactotron!">
<WelcomeText>Connect a device or simulator to get started.</WelcomeText>
<WelcomeText>Need to set up your app to use Reactotron?</WelcomeText>
<Container onClick={openDocs}>Check out the docs here!</Container>
<Container onClick={()=>{
sendExternalLinkAnalyticsEvent("docs")
openDocs()}}>Check out the docs here!</Container>
</EmptyState>
)
}
Expand Down

0 comments on commit 63aa741

Please sign in to comment.