-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Rate this Page to all Docs Pages #1057
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import { event } from "@site/src/utils/gtags.client"; | ||
|
||
// Default export function component | ||
export default function FeedbackFaces() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Best component name ever haha
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I used to make games. I still do, but I used to too. I don't think I'll ever top getting to implement a function called
ExecuteWarpJump
event({ | ||
action: "feedback_click", | ||
category: "Feedback", | ||
label: label, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would also probably lowercase here, but just a nit. Do you also want to use the user hash so that you can tell how many unique people are clicking it and reduce the number of multiple clicks?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually want multiple clicks here. Sort of like clapping on Medium vs. upvotes or downvotes.
}); | ||
|
||
// Reset the clicked state after a brief delay | ||
setTimeout(() => setClickedFace(null), 300); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you want to let someone click more than one time? Do you just want to have in state its been clicked and disable clicking any further? I'd probably store something in local storage so the same person on the same browser can't click again imo.
CSS is inline, might be a better way to do this
Unsure if events are making it through