Skip to content

Commit

Permalink
feat: unlimited credits for the open-source
Browse files Browse the repository at this point in the history
  • Loading branch information
nevo-david committed Jan 5, 2025
1 parent e87089d commit f4a4d8a
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit f4a4d8a

Please sign in to comment.