diff --git a/.eslintrc.json b/.eslintrc.json
index 6c0958f7b..d746c1644 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -14,6 +14,8 @@
"simple-import-sort/exports": "error",
"import/first": "error",
"import/newline-after-import": "error",
- "import/no-duplicates": "error"
+ "import/no-duplicates": "error",
+ "@typescript-eslint/no-unused-vars": "error",
+ "no-console": ["error", { "allow": ["warn", "error", "info"] }]
}
}
diff --git a/apps/web/public/locales/en/app.json b/apps/web/public/locales/en/app.json
index 7a1e28605..3af47757f 100644
--- a/apps/web/public/locales/en/app.json
+++ b/apps/web/public/locales/en/app.json
@@ -1,11 +1,9 @@
{
"12h": "12-hour",
"24h": "24-hour",
- "addParticipant": "Add participant",
"addTimeOption": "Add time option",
"adminPollTitle": "{{title}}: Admin",
"alreadyRegistered": "Already registered? Login →",
- "alreadyVoted": "You have already voted",
"applyToAllDates": "Apply to all dates",
"areYouSure": "Are you sure?",
"back": "Back",
@@ -15,15 +13,10 @@
"changeName": "Change name",
"changeNameDescription": "Enter a new name for this participant.",
"changeNameInfo": "This will not affect any votes you have already made.",
+ "close": "Close",
"comment": "Comment",
"commentPlaceholder": "Leave a comment on this poll (visible to everyone)",
"comments": "Comments",
- "feedbackSent": "Thank you! Your feedback has been sent.",
- "feedbackFormLabel": "How can we improve ?",
- "feedbackFormPlaceholder": "Share your thoughts…",
- "feedbackFormFooter": "Need help? Visit the support page.",
- "feedbackFormTitle": "Feedback Form",
- "close": "Close",
"continue": "Continue",
"copied": "Copied",
"copyLink": "Copy link",
@@ -45,7 +38,6 @@
"demoPollNotice": "Demo polls are automatically deleted after 1 day",
"description": "Description",
"descriptionPlaceholder": "Hey everyone, please choose the dates that work for you!",
- "donate": "Donate",
"edit": "Edit",
"editDetails": "Edit details",
"editOptions": "Edit options",
@@ -57,6 +49,11 @@
"endSession": "End session",
"expiredOrInvalidLink": "This link is expired or invalid. Please request a new link.",
"exportToCsv": "Export to CSV",
+ "feedbackFormFooter": "Need help? Visit the support page.",
+ "feedbackFormLabel": "How can we improve ?",
+ "feedbackFormPlaceholder": "Share your thoughts…",
+ "feedbackFormTitle": "Feedback Form",
+ "feedbackSent": "Thank you! Your feedback has been sent.",
"forgetMe": "Forget me",
"goToAdmin": "Go to Admin",
"guest": "Guest",
@@ -74,7 +71,6 @@
"loginSuccessful": "You're logged in! Please wait while you are redirected…",
"logout": "Logout",
"manage": "Manage",
- "menu": "Menu",
"mixedOptionsDescription": "You can't have both time and date options in the same poll. Which would you like to keep?",
"mixedOptionsKeepDates": "Keep date options",
"mixedOptionsKeepTimes": "Keep time options",
@@ -91,12 +87,10 @@
"nextMonth": "Next month",
"no": "No",
"noDatesSelected": "No dates selected",
- "notificationsDisabled": "Notifications have been disabled",
- "notificationsEnabled": "Notifications have been enabled for {{title}}",
- "notificationsOff": "Get notified when participants respond to your poll",
+ "notificationsDisabled": "Notifications have been disabled for {{title}}",
+ "notificationsGuest": "Log in to turn on notifications",
+ "notificationsOff": "Notifications are off",
"notificationsOn": "Notifications are on",
- "notificationsOnDescription": "An email will be sent to {{email}} when there is activity on this poll.",
- "notificationsVerifyEmail": "You need to verify your email to turn on notifications",
"notRegistered": "Create a new account →",
"noVotes": "No one has voted for this option",
"ok": "Ok",
@@ -115,7 +109,6 @@
"participantCount_two": "{{count}} participants",
"participantCount_zero": "{{count}} participants",
"pollHasBeenLocked": "This poll has been locked",
- "pollOwnerNotice": "Hey {{name}}, looks like you are the owner of this poll.",
"pollsEmpty": "No polls created",
"possibleAnswers": "Possible answers",
"preferences": "Preferences",
@@ -145,7 +138,6 @@
"titlePlaceholder": "Monthly Meetup",
"today": "Today",
"unlockPoll": "Unlock poll",
- "unverifiedMessage": "An email has been sent to {{email}} with a link to verify the email address.",
"user": "User",
"userAlreadyExists": "A user with that email already exists",
"userDoesNotExist": "The requested user was not found",
@@ -154,7 +146,6 @@
"verificationCodeHelp": "Didn't get the email? Check your spam/junk.",
"verificationCodePlaceholder": "Enter your 6-digit code",
"verificationCodeSent": "A verification code has been sent to {{email}}Change",
- "verificationEmailSent": "An email has been sent to {{email}} with a link to enable notifications",
"verifyYourEmail": "Verify your email",
"weekStartsOn": "Week starts on",
"weekView": "Week view",
diff --git a/apps/web/public/locales/en/common.json b/apps/web/public/locales/en/common.json
index 97fb5a642..87eb94b6b 100644
--- a/apps/web/public/locales/en/common.json
+++ b/apps/web/public/locales/en/common.json
@@ -1,7 +1,6 @@
{
"blog": "Blog",
"discussions": "Discussions",
- "donate": "Donate",
"footerCredit": "Made by @imlukevella",
"footerSponsor": "This project is user-funded. Please consider supporting it by donating.",
"home": "Home",
diff --git a/apps/web/src/components/admin-control.tsx b/apps/web/src/components/admin-control.tsx
index 3c055168c..0b17c0a70 100644
--- a/apps/web/src/components/admin-control.tsx
+++ b/apps/web/src/components/admin-control.tsx
@@ -1,46 +1,18 @@
import { AnimatePresence, m } from "framer-motion";
-import { useRouter } from "next/router";
import { useTranslation } from "next-i18next";
import React from "react";
-import toast from "react-hot-toast";
import { Button } from "@/components/button";
import Share from "@/components/icons/share.svg";
-import { usePostHog } from "@/utils/posthog";
import { useParticipants } from "./participants-provider";
import ManagePoll from "./poll/manage-poll";
-import { useUpdatePollMutation } from "./poll/mutations";
import NotificationsToggle from "./poll/notifications-toggle";
-import { usePoll } from "./poll-context";
import Sharing from "./sharing";
export const AdminControls = (props: { children?: React.ReactNode }) => {
- const { urlId } = usePoll();
const { t } = useTranslation("app");
- const router = useRouter();
-
- const { mutate: updatePollMutation } = useUpdatePollMutation();
- const posthog = usePostHog();
-
- React.useEffect(() => {
- if (router.query.unsubscribe) {
- updatePollMutation(
- { urlId: urlId, notifications: false },
- {
- onSuccess: () => {
- toast.success(t("notificationsDisabled"));
- posthog?.capture("unsubscribed from notifications");
- },
- },
- );
- router.replace(`/admin/${router.query.urlId}`, undefined, {
- shallow: true,
- });
- }
- }, [urlId, router, updatePollMutation, t, posthog]);
-
const { participants } = useParticipants();
const [isSharingVisible, setIsSharingVisible] = React.useState(
diff --git a/apps/web/src/components/auth/login-modal.tsx b/apps/web/src/components/auth/login-modal.tsx
index 045fa7630..ca2962c5e 100644
--- a/apps/web/src/components/auth/login-modal.tsx
+++ b/apps/web/src/components/auth/login-modal.tsx
@@ -13,7 +13,10 @@ export const LoginModal: React.FunctionComponent<{
const [defaultEmail, setDefaultEmail] = React.useState("");
return (
-