Skip to content

Commit

Permalink
Fix button onClick duplication in Pricing and
Browse files Browse the repository at this point in the history
MoreFeatures components
  • Loading branch information
vvu060 committed Jan 4, 2024
1 parent b871918 commit 45a5bd0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/components/contact/Hello.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from "react"

import Grid from "@site/static/images/about/grid-large.svg"
import Button from "../shared/Button"
import { analyticsHandler } from "@site/src/utils"
Expand Down
4 changes: 2 additions & 2 deletions src/components/enterprise/Pricing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,20 +52,20 @@ const Pricing = () => {
<div className="hidden sm:block text-center mx-4">
<Button
title={plan.buttonText}
onClick={() => analyticsHandler("Pricing", "Click", `${plan.buttonText}`)}
href={plan.href}
theme={plan.mostPopular ? "dark" : "light"}
width="320px"
onClick={() => analyticsHandler("Pricing", "Click", `${plan.buttonText}`)}
/>
</div>

<div className="sm:hidden mt-10 text-center mx-4">
<Button
title={plan.buttonText}
onClick={() => analyticsHandler("Pricing", "Click", `${plan.buttonText}`)}
href={plan.href}
theme={plan.mostPopular ? "dark" : "light"}
width="300px"
onClick={() => analyticsHandler("Pricing", "Click", `${plan.buttonText}`)}
/>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/components/home/MoreFeatures.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ const MoreFeatures = () => {
))}
</div>
<div className="sm:hidden">
<Button title="View More" href="/enterprise/" theme="light" width="300px" onClick={() => analyticsHandler("Home Page", "Click", "View More")} />
<Button onClick={() => analyticsHandler("Home Page", "Click", "View More")} title="View More" href="/enterprise/" theme="light" width="300px" />
</div>
<div className="hidden sm:block">
<Button title="View More" href="/enterprise/" theme="light" width="500px" onClick={() => analyticsHandler("Home Page", "Click", "View More")} />
<Button onClick={() => analyticsHandler("Home Page", "Click", "View More")} title="View More" href="/enterprise/" theme="light" width="500px" />
</div>
</div>
</section>
Expand Down

0 comments on commit 45a5bd0

Please sign in to comment.