fix: add limit check

ai/roadmap
Arik Chakma 8 months ago committed by Kamran Ahmed
parent bb9dcfb678
commit 610aae2a07
  1. 12
      src/components/GenerateRoadmap/GenerateRoadmap.tsx

@ -36,6 +36,18 @@ export function GenerateRoadmap() {
setIsLoading(true);
setHasSubmitted(true);
if (!roadmapTopic) {
toast.error('Please enter a topic');
setIsLoading(false);
return;
}
if (roadmapLimitUsed >= roadmapLimit) {
toast.error('You have reached your limit of generating roadmaps');
setIsLoading(false);
return;
}
const fingerprintPromise = await fp.load({
debug: import.meta.env.DEV,
});

Loading…
Cancel
Save