diff --git a/src/components/Projects/ListProjectSolutions.tsx b/src/components/Projects/ListProjectSolutions.tsx index b7adcf82c..c691084be 100644 --- a/src/components/Projects/ListProjectSolutions.tsx +++ b/src/components/Projects/ListProjectSolutions.tsx @@ -10,6 +10,8 @@ import { deleteUrlParam, getUrlParams, setUrlParams } from '../../lib/browser'; import { pageProgressMessage } from '../../stores/page'; import { cn } from '../../lib/classname'; import { LeavingRoadmapWarningModal } from './LeavingRoadmapWarningModal'; +import { isLoggedIn } from '../../lib/jwt'; +import { showLoginPopup } from '../../lib/popup'; export interface ProjectStatusDocument { _id?: string; @@ -99,6 +101,11 @@ export function ListProjectSolutions(props: ListProjectSolutionsProps) { solutionId: string, voteType: AllowedVoteType, ) => { + if (!isLoggedIn()) { + showLoginPopup(); + return; + } + pageProgressMessage.set('Submitting vote...'); const { response, error } = await httpPost( `${import.meta.env.PUBLIC_API_URL}/v1-vote-project/${solutionId}`, diff --git a/src/pages/projects/[projectId]/index.astro b/src/pages/projects/[projectId]/index.astro index d58326b79..c75a0e217 100644 --- a/src/pages/projects/[projectId]/index.astro +++ b/src/pages/projects/[projectId]/index.astro @@ -44,7 +44,6 @@ const githubUrl = `https://github.com/kamranahmedse/developer-roadmap/tree/maste keywords={projectData.seo.keywords} jsonLd={jsonLdSchema} resourceId={projectId} - resourceType='project' >
diff --git a/src/pages/projects/[projectId]/solutions.astro b/src/pages/projects/[projectId]/solutions.astro index 5de01d6b7..48ff28fc6 100644 --- a/src/pages/projects/[projectId]/solutions.astro +++ b/src/pages/projects/[projectId]/solutions.astro @@ -45,7 +45,6 @@ const githubUrl = `https://github.com/kamranahmedse/developer-roadmap/tree/maste keywords={projectData.seo.keywords} jsonLd={jsonLdSchema} resourceId={projectId} - resourceType='project' >