Skip to content

Commit

Permalink
feat(reference): act-1521 - added tracking connect wallet event (#1537)
Browse files Browse the repository at this point in the history
  • Loading branch information
TrofimovAnton85 authored Sep 10, 2024
1 parent 58a0f57 commit 918391c
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/components/ParserOpenRPC/AuthBox/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,28 @@ import React from "react";
import styles from "./styles.module.css";
import global from "../global.module.css";
import clsx from "clsx";
import { trackClickForSegment } from "@site/src/lib/segmentAnalytics";

interface AuthBoxProps {
handleConnect: () => void;
}

export const AuthBox = ({ handleConnect }: AuthBoxProps) => {
const connectHandler = () => {
trackClickForSegment({
eventName: "Connect wallet",
clickType: "Connect wallet",
userExperience: "B",
});
handleConnect();
}
return (
<div className={styles.msgWrapper}>
<div className={styles.msgText}>Connect your MetaMask wallet to send requests to your Infura API keys.</div>
<div>
<button
className={clsx(global.primaryBtn, styles.msgButton)}
onClick={() => handleConnect()}
onClick={connectHandler}
data-test-id="connect-wallet"
>
Connect Wallet
Expand Down

0 comments on commit 918391c

Please sign in to comment.