diff --git a/src/components/GenerateRoadmap/GenerateRoadmap.tsx b/src/components/GenerateRoadmap/GenerateRoadmap.tsx index cced06f3b..a5fcd7d89 100644 --- a/src/components/GenerateRoadmap/GenerateRoadmap.tsx +++ b/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, });