♻️ Use user tier to determine subscription status (#1686)

This commit is contained in:
Luke Vella 2025-04-24 10:35:23 +01:00 committed by GitHub
parent 5c61057a84
commit cd38e9105d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 9 additions and 71 deletions

View file

@ -17,7 +17,8 @@ import { Trans } from "react-i18next";
import { PayWallDialog } from "@/components/pay-wall-dialog";
import { ProBadge } from "@/components/pro-badge";
import { usePlan } from "@/contexts/plan";
import { useUser } from "../user-provider";
export type PollSettingsFormData = {
requireParticipantEmail: boolean;
@ -66,9 +67,9 @@ export const PollSettingsForm = ({ children }: React.PropsWithChildren) => {
const form = useFormContext<PollSettingsFormData>();
const posthog = usePostHog();
const paywallDialog = useDialog();
const plan = usePlan();
const { user } = useUser();
const isFree = plan === "free";
const isFree = user.tier !== "pro";
return (
<>