mirror of
https://github.com/lukevella/rallly.git
synced 2025-05-29 08:46:22 +02:00
♻️ Use user tier to determine subscription status (#1686)
This commit is contained in:
parent
5c61057a84
commit
cd38e9105d
5 changed files with 9 additions and 71 deletions
|
@ -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 (
|
||||
<>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue