diff --git a/components/Common/Button/index.jsx b/components/Common/Button/index.jsx index dd2f3886..4b2cea03 100644 --- a/components/Common/Button/index.jsx +++ b/components/Common/Button/index.jsx @@ -33,11 +33,9 @@ const Button = ({ const handleClick = useCallback( (e) => { onClick && onClick(e); - if (delayLinkMs) { e.preventDefault(); setTimeout(() => { - console.log('href', href); router.push(href); }, delayLinkMs); } diff --git a/pages/plugins.js b/pages/plugins.js index df774da8..52b07441 100644 --- a/pages/plugins.js +++ b/pages/plugins.js @@ -1,19 +1,26 @@ import { gql } from '@apollo/client'; import { NextSeo } from 'next-seo'; import PropTypes from 'prop-types'; +import { useCallback } from 'react'; +import Button from '../components/Common/Button'; import Plugin from "../components/Plugins/plugin-card"; import helpers from '../helpers'; import { MainLayout } from '../layouts'; +import * as analytics from '../lib/analytics'; import client from '../services/plugin-api'; -import Link from 'next/link'; const Plugins = ({ plugins }) => { + const handleStartNowClick = useCallback((eventName) => { + analytics.event({ + action: eventName + }); + }, []); return ( <>
@@ -35,21 +42,31 @@ const Plugins = ({ plugins }) => {
- - - Learn more about plugins - - - - - Create your own plugin - - - - - Request a new plugin - - +