diff --git a/frontend/libs/components/promptbox/src/lib/PromptBox2D.tsx b/frontend/libs/components/promptbox/src/lib/PromptBox2D.tsx index 2ca3ba1b36..bb5cdc9f75 100644 --- a/frontend/libs/components/promptbox/src/lib/PromptBox2D.tsx +++ b/frontend/libs/components/promptbox/src/lib/PromptBox2D.tsx @@ -25,7 +25,6 @@ import { twMerge } from "tailwind-merge"; import { GenerationProvider } from "@storyteller/api-enums"; import { GenerationCountPicker } from "./common/GenerationCountPicker"; import { StoreApi, UseBoundStore } from "zustand"; -import { useSubscriptionState } from "@storyteller/subscription"; export type AspectRatio = "wide" | "tall" | "square"; @@ -68,10 +67,6 @@ export const PromptBox2D = ({ }: PromptBox2DProps) => { useSignals(); - // Check subscription status to determine if user is on free plan - const hasPaidPlan = useSubscriptionState((s) => s.hasPaidPlan); - const isFreeUser = !hasPaidPlan(); - const [isModalOpen, setIsModalOpen] = useState(false); const [content, setContent] = useState(""); @@ -493,7 +488,6 @@ export const PromptBox2D = ({ handleCountChange={(count) => { onGenerationCountChange?.(count); }} - isFreeUser={isFreeUser} /> void; @@ -80,10 +79,6 @@ export const PromptBoxEdit = ({ onRedo, credits, }: PromptBoxEditProps) => { - // Check subscription status to determine if user is on free plan - const hasPaidPlan = useSubscriptionState((s) => s.hasPaidPlan); - const isFreeUser = !hasPaidPlan(); - const [prompt, setPrompt] = useState(""); const [useSystemPrompt, setUseSystemPrompt] = useState(true); const [isFocused, setIsFocused] = useState(false); @@ -509,7 +504,6 @@ export const PromptBoxEdit = ({ handleCountChange={(count) => { onGenerationCountChange?.(count); }} - isFreeUser={isFreeUser} /> JobContextType; @@ -68,10 +67,6 @@ export const PromptBoxImage = ({ }: PromptBoxImageProps) => { useSignals(); - // Check subscription status to determine if user is on free plan - const hasPaidPlan = useSubscriptionState((s) => s.hasPaidPlan); - const isFreeUser = !hasPaidPlan(); - console.debug("Selected model:", selectedModel); useEffect(() => { @@ -535,7 +530,6 @@ export const PromptBoxImage = ({ handleCountChange={(count) => { setGenerationCount(count); }} - isFreeUser={isFreeUser} /> void; - isFreeUser?: boolean; } export const GenerationCountPicker = ({ currentModel, currentCount, handleCountChange, - isFreeUser = false, }: GenerationCountPickerProps) => { const maxGenerationCount = currentModel?.maxGenerationCount || DEFAULT_GENERATION_COUNT; const hasPredefinedOptions = !!currentModel?.predefinedGenerationCounts; - const isNanoBananaPro = currentModel?.id === "nano_banana_pro"; - const shouldLimitGenerations = isFreeUser && isNanoBananaPro; let generationCountOptions: PopoverItem[]; - // Free users on Nano Banana Pro are limited to 1 generation at a time - if (shouldLimitGenerations) { - generationCountOptions = [{ label: "1", selected: true }]; - } else if (hasPredefinedOptions) { + if (hasPredefinedOptions) { // Count pickers either have a "[1,2, ... max]" set of options, or a pre-defined list of options. generationCountOptions = buildPredefinedCountOptions( currentModel?.predefinedGenerationCounts || [], @@ -49,46 +42,28 @@ export const GenerationCountPicker = ({ return; } if (count < 1 || count > maxGenerationCount) { - // Clamp to valid range count = Math.min(Math.max(1, count), maxGenerationCount); } handleCountChange(count); }; - // Tooltip content changes based on subscription status (only for Nano Banana Pro) - const tooltipContent = shouldLimitGenerations ? ( -
-
- - Generate more images -
-

- Subscribe to ArtCraft to generate multiple images at once. -

-
- ) : ( - "Number of generations" - ); - return ( - <> - - } - buttonClassName="h-9" - /> - - + + } + buttonClassName="h-9" + /> + ); };