mirror of
https://github.com/lukevella/rallly.git
synced 2025-06-08 05:31:51 +02:00
Update analytics (#432)
This commit is contained in:
parent
a4ca5f1676
commit
b0aa9db26d
18 changed files with 122 additions and 106 deletions
|
@ -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);
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue