diff --git a/backend/database/src/index.ts b/backend/database/src/index.ts index 604b093..e8af83e 100644 --- a/backend/database/src/index.ts +++ b/backend/database/src/index.ts @@ -181,7 +181,7 @@ export default { if (!dbUser) { return new Response("User not found.", { status: 400 }); } - if (dbUser.generations !== null && dbUser.generations >= 30) { + if (dbUser.generations !== null && dbUser.generations >= 10) { return new Response("You reached the maximum # of generations.", { status: 400 }); } diff --git a/frontend/components/editor/editor.tsx b/frontend/components/editor/editor.tsx index f8fcda1..ce7c6da 100644 --- a/frontend/components/editor/editor.tsx +++ b/frontend/components/editor/editor.tsx @@ -529,10 +529,6 @@ export default function CodeEditor({ setFiles(response); setDeletingFolderId(""); }); - - setTimeout(() => { - setDeletingFolderId(""); - }, 3000); }; if (isAwaitingConnection) diff --git a/frontend/components/editor/generate.tsx b/frontend/components/editor/generate.tsx index 794a502..e8bcc47 100644 --- a/frontend/components/editor/generate.tsx +++ b/frontend/components/editor/generate.tsx @@ -59,7 +59,7 @@ export default function GenerateInput({ }: { regenerate?: boolean; }) => { - if (user.generations >= 30) { + if (user.generations >= 10) { toast.error( "You reached the maximum # of generations. Contact @ishaandey_ on X/Twitter to reset :)" ); diff --git a/frontend/components/ui/userButton.tsx b/frontend/components/ui/userButton.tsx index 39b1d3f..dc701b5 100644 --- a/frontend/components/ui/userButton.tsx +++ b/frontend/components/ui/userButton.tsx @@ -1,4 +1,4 @@ -"use client" +"use client"; import { DropdownMenu, @@ -7,26 +7,27 @@ import { DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, -} from "@/components/ui/dropdown-menu" -import { User } from "@/lib/types" -import { useClerk } from "@clerk/nextjs" -import { LogOut, Pencil, Sparkles } from "lucide-react" -import { useRouter } from "next/navigation" +} from "@/components/ui/dropdown-menu"; +import { User } from "@/lib/types"; +import { useClerk } from "@clerk/nextjs"; +import { LogOut, Pencil, Sparkles } from "lucide-react"; +import { useRouter } from "next/navigation"; export default function UserButton({ userData }: { userData: User }) { - if (!userData) return null + if (!userData) return null; - const { signOut } = useClerk() - const router = useRouter() + const { signOut } = useClerk(); + const router = useRouter(); return (
- {userData.name && userData.name - .split(" ") - .slice(0, 2) - .map((name) => name[0].toUpperCase())} + {userData.name && + userData.name + .split(" ") + .slice(0, 2) + .map((name) => name[0].toUpperCase())}
@@ -41,13 +42,13 @@ export default function UserButton({ userData }: { userData: User }) {
- AI Usage: {userData.generations}/30 + AI Usage: {userData.generations}/10
@@ -66,5 +67,5 @@ export default function UserButton({ userData }: { userData: User }) { - ) + ); }