Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions app/javascript/controllers/vote_tracker_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@ export default class extends Controller {
this.startTime = Date.now();
}

trackRepoClick() {
trackRepoClick(event) {
if (event.button === 2) return;
console.log("Repo clicked!");
this.repoFieldTarget.value = "true";
}

trackDemoClick() {
trackDemoClick(event) {
if (event.button === 2) return;
console.log("Demo clicked!");
this.demoFieldTarget.value = "true";
}
Expand Down
4 changes: 2 additions & 2 deletions app/views/votes/_project_showcase.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
icon: "icons/globe2.svg",
aria: { label: "Demo" },
target: "_blank",
data: { action: "click->vote-tracker#trackDemoClick" }
data: { action: "click->vote-tracker#trackDemoClick auxclick->vote-tracker#trackDemoClick" }
) %>
<%= render ButtonComponent.new(
href: project.repo_url,
Expand All @@ -40,7 +40,7 @@
icon: "icons/code.svg",
aria: { label: "Repo" },
target: "_blank",
data: { action: "click->vote-tracker#trackRepoClick" }
data: { action: "click->vote-tracker#trackRepoClick auxclick->vote-tracker#trackRepoClick" }
) %>
<%= render ButtonComponent.new(
color: :red,
Expand Down
Loading