mirror of
https://github.com/LukeHagar/polar.git
synced 2025-12-06 04:20:58 +00:00
fix example
This commit is contained in:
12
example/convex/_generated/api.d.ts
vendored
12
example/convex/_generated/api.d.ts
vendored
@@ -113,7 +113,7 @@ export declare const components: {
|
||||
id: string;
|
||||
metadata: Record<string, any>;
|
||||
modifiedAt: string | null;
|
||||
priceId: string;
|
||||
priceId?: string;
|
||||
productId: string;
|
||||
recurringInterval: "month" | "year" | null;
|
||||
startedAt: string | null;
|
||||
@@ -141,7 +141,7 @@ export declare const components: {
|
||||
id: string;
|
||||
metadata: Record<string, any>;
|
||||
modifiedAt: string | null;
|
||||
priceId: string;
|
||||
priceId?: string;
|
||||
product: {
|
||||
createdAt: string;
|
||||
description: string | null;
|
||||
@@ -264,7 +264,7 @@ export declare const components: {
|
||||
id: string;
|
||||
metadata: Record<string, any>;
|
||||
modifiedAt: string | null;
|
||||
priceId: string;
|
||||
priceId?: string;
|
||||
productId: string;
|
||||
recurringInterval: "month" | "year" | null;
|
||||
startedAt: string | null;
|
||||
@@ -296,7 +296,7 @@ export declare const components: {
|
||||
id: string;
|
||||
metadata: Record<string, any>;
|
||||
modifiedAt: string | null;
|
||||
priceId: string;
|
||||
priceId?: string;
|
||||
productId: string;
|
||||
recurringInterval: "month" | "year" | null;
|
||||
startedAt: string | null;
|
||||
@@ -371,7 +371,7 @@ export declare const components: {
|
||||
id: string;
|
||||
metadata: Record<string, any>;
|
||||
modifiedAt: string | null;
|
||||
priceId: string;
|
||||
priceId?: string;
|
||||
product: {
|
||||
createdAt: string;
|
||||
description: string | null;
|
||||
@@ -490,7 +490,7 @@ export declare const components: {
|
||||
id: string;
|
||||
metadata: Record<string, any>;
|
||||
modifiedAt: string | null;
|
||||
priceId: string;
|
||||
priceId?: string;
|
||||
productId: string;
|
||||
recurringInterval: "month" | "year" | null;
|
||||
startedAt: string | null;
|
||||
|
||||
@@ -88,7 +88,7 @@ const currentUser = async (ctx: QueryCtx) => {
|
||||
isPremiumPlus,
|
||||
subscription,
|
||||
maxTodos: isPremiumPlus
|
||||
? MAX_PREMIUM_TODOS
|
||||
? undefined
|
||||
: isPremium
|
||||
? MAX_PREMIUM_TODOS
|
||||
: MAX_FREE_TODOS,
|
||||
@@ -137,8 +137,7 @@ export const insertTodo = mutation({
|
||||
throw new Error("Reached maximum number of todos for free plan");
|
||||
}
|
||||
if (
|
||||
(productKey === "premiumMonthly" ||
|
||||
productKey === "premiumPlusMonthly") &&
|
||||
(productKey === "premiumMonthly" || productKey === "premiumYearly") &&
|
||||
todoCount >= MAX_PREMIUM_TODOS
|
||||
) {
|
||||
throw new Error("Reached maximum number of todos for premium plan");
|
||||
|
||||
@@ -29,6 +29,7 @@ export default function TodoList() {
|
||||
const [newTodo, setNewTodo] = useState("");
|
||||
|
||||
const todosLength = todos?.length ?? 0;
|
||||
console.log("user", user);
|
||||
const isAtMaxTodos = user?.maxTodos && todosLength >= user.maxTodos;
|
||||
|
||||
const {
|
||||
|
||||
12
src/component/_generated/api.d.ts
vendored
12
src/component/_generated/api.d.ts
vendored
@@ -99,7 +99,7 @@ export type Mounts = {
|
||||
id: string;
|
||||
metadata: Record<string, any>;
|
||||
modifiedAt: string | null;
|
||||
priceId: string;
|
||||
priceId?: string;
|
||||
productId: string;
|
||||
recurringInterval: "month" | "year" | null;
|
||||
startedAt: string | null;
|
||||
@@ -127,7 +127,7 @@ export type Mounts = {
|
||||
id: string;
|
||||
metadata: Record<string, any>;
|
||||
modifiedAt: string | null;
|
||||
priceId: string;
|
||||
priceId?: string;
|
||||
product: {
|
||||
createdAt: string;
|
||||
description: string | null;
|
||||
@@ -250,7 +250,7 @@ export type Mounts = {
|
||||
id: string;
|
||||
metadata: Record<string, any>;
|
||||
modifiedAt: string | null;
|
||||
priceId: string;
|
||||
priceId?: string;
|
||||
productId: string;
|
||||
recurringInterval: "month" | "year" | null;
|
||||
startedAt: string | null;
|
||||
@@ -282,7 +282,7 @@ export type Mounts = {
|
||||
id: string;
|
||||
metadata: Record<string, any>;
|
||||
modifiedAt: string | null;
|
||||
priceId: string;
|
||||
priceId?: string;
|
||||
productId: string;
|
||||
recurringInterval: "month" | "year" | null;
|
||||
startedAt: string | null;
|
||||
@@ -357,7 +357,7 @@ export type Mounts = {
|
||||
id: string;
|
||||
metadata: Record<string, any>;
|
||||
modifiedAt: string | null;
|
||||
priceId: string;
|
||||
priceId?: string;
|
||||
product: {
|
||||
createdAt: string;
|
||||
description: string | null;
|
||||
@@ -476,7 +476,7 @@ export type Mounts = {
|
||||
id: string;
|
||||
metadata: Record<string, any>;
|
||||
modifiedAt: string | null;
|
||||
priceId: string;
|
||||
priceId?: string;
|
||||
productId: string;
|
||||
recurringInterval: "month" | "year" | null;
|
||||
startedAt: string | null;
|
||||
|
||||
Reference in New Issue
Block a user