Update analytics (#432)

This commit is contained in:
Luke Vella 2023-01-24 14:04:13 +00:00 committed by GitHub
parent a4ca5f1676
commit b0aa9db26d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 122 additions and 106 deletions

View file

@ -1,5 +1,4 @@
import { Trans, useTranslation } from "next-i18next";
import { usePlausible } from "next-plausible";
import * as React from "react";
import { Button } from "@/components/button";
@ -18,7 +17,6 @@ const NotificationsToggle: React.VoidFunctionComponent = () => {
const { mutate: updatePollMutation } = useUpdatePollMutation();
const plausible = usePlausible();
return (
<Tooltip
content={
@ -63,12 +61,7 @@ const NotificationsToggle: React.VoidFunctionComponent = () => {
notifications: !poll.notifications,
},
{
onSuccess: ({ notifications }) => {
plausible(
notifications
? "Turned notifications on"
: "Turned notifications off",
);
onSuccess: () => {
setIsUpdatingNotifications(false);
},
},