Skip to content

πŸ“¨ The ultimate agentic social media scheduling tool πŸ€–

feat: unlimited credits for the open-source

Nevo Davidf4a4d8a2094d
diff --git a/apps/frontend/src/components/launches/polonto/polonto.picture.generation.tsx b/apps/frontend/src/components/launches/polonto/polonto.picture.generation.tsx
index 61ec8ef8c..f1e4bfd74 100644
--- a/apps/frontend/src/components/launches/polonto/polonto.picture.generation.tsx
+++ b/apps/frontend/src/components/launches/polonto/polonto.picture.generation.tsx
@@ -11,15 +11,20 @@ import { useFetch } from '@gitroom/helpers/utils/custom.fetch';
import useSWR from 'swr';
import { Button } from '@gitroom/react/form/button';
import { useToaster } from '@gitroom/react/toaster/toaster';
+import { useVariables } from '@gitroom/react/helpers/variable.context';
const GenerateTab = observer(({ store }: any) => {
const inputRef = React.useRef<any>(null);
const [image, setImage] = React.useState(null);
const [loading, setLoading] = React.useState(false);
+ const {billingEnabled} = useVariables();
const fetch = useFetch();
const toast = useToaster();
const loadCredits = useCallback(async () => {
+ if (!billingEnabled) {
+ return {credits: 1000};
+ }
return (
await fetch(`/copilot/credits`, {
method: 'GET',