chore(app): add vote analytics
This commit is contained in:
@@ -1,21 +1,23 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import { Medal } from "phosphor-react";
|
import { Medal } from "phosphor-react";
|
||||||
|
import ReactGA from "react-ga";
|
||||||
|
|
||||||
import "./Banner.css";
|
import "./Banner.css";
|
||||||
|
|
||||||
const Banner = () => {
|
const Banner = () => {
|
||||||
|
const handleClick = () => {
|
||||||
|
ReactGA.event({ category: "Outbound", action: "Click", label: "Vote" });
|
||||||
|
window.open(
|
||||||
|
"https://www.figma.com/community/file/903830135544202908",
|
||||||
|
"_blank",
|
||||||
|
"noopener noreferrer"
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="banner">
|
<div className="banner">
|
||||||
The 2022 Figma Community Awards are here!
|
The 2022 Figma Community Awards are here!
|
||||||
<button
|
<button className="main-button" onClick={handleClick}>
|
||||||
className="main-button"
|
|
||||||
onClick={
|
|
||||||
() => window.open(
|
|
||||||
"https://www.figma.com/community/file/903830135544202908",
|
|
||||||
"_blank",
|
|
||||||
"noopener noreferrer",
|
|
||||||
)
|
|
||||||
}>
|
|
||||||
<Medal size={24} weight="fill" />
|
<Medal size={24} weight="fill" />
|
||||||
Vote for Phosphor
|
Vote for Phosphor
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
Reference in New Issue
Block a user