diff --git a/frontend/src/components/settings/AccessCodeSection.tsx b/frontend/src/components/settings/AccessCodeSection.tsx index 5135307..99ff0c7 100644 --- a/frontend/src/components/settings/AccessCodeSection.tsx +++ b/frontend/src/components/settings/AccessCodeSection.tsx @@ -6,6 +6,7 @@ import { Label } from "../ui/label"; import useThrottle from "../../hooks/useThrottle"; import { Progress } from "../ui/progress"; import { PICO_BACKEND_FORM_SECRET } from "../../config"; +import { useStore } from "../../store/store"; interface Props { settings: Settings; @@ -31,6 +32,7 @@ function AccessCodeSection({ settings, setSettings }: Props) { const [usedCredits, setUsedCredits] = useState(0); const [totalCredits, setTotalCredits] = useState(0); const throttledAccessCode = useThrottle(settings.accessCode || "", 500); + const setPricingDialogOpen = useStore((state) => state.setPricingDialogOpen); const fetchState = (() => { if (!settings.accessCode) return FetchState.EMPTY; @@ -100,11 +102,16 @@ function AccessCodeSection({ settings, setSettings }: Props) { {fetchState === "EMPTY" && (