|
|
@ -10,6 +10,8 @@ import { deleteUrlParam, getUrlParams, setUrlParams } from '../../lib/browser'; |
|
|
|
import { pageProgressMessage } from '../../stores/page'; |
|
|
|
import { pageProgressMessage } from '../../stores/page'; |
|
|
|
import { cn } from '../../lib/classname'; |
|
|
|
import { cn } from '../../lib/classname'; |
|
|
|
import { LeavingRoadmapWarningModal } from './LeavingRoadmapWarningModal'; |
|
|
|
import { LeavingRoadmapWarningModal } from './LeavingRoadmapWarningModal'; |
|
|
|
|
|
|
|
import { isLoggedIn } from '../../lib/jwt'; |
|
|
|
|
|
|
|
import { showLoginPopup } from '../../lib/popup'; |
|
|
|
|
|
|
|
|
|
|
|
export interface ProjectStatusDocument { |
|
|
|
export interface ProjectStatusDocument { |
|
|
|
_id?: string; |
|
|
|
_id?: string; |
|
|
@ -99,6 +101,11 @@ export function ListProjectSolutions(props: ListProjectSolutionsProps) { |
|
|
|
solutionId: string, |
|
|
|
solutionId: string, |
|
|
|
voteType: AllowedVoteType, |
|
|
|
voteType: AllowedVoteType, |
|
|
|
) => { |
|
|
|
) => { |
|
|
|
|
|
|
|
if (!isLoggedIn()) { |
|
|
|
|
|
|
|
showLoginPopup(); |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
pageProgressMessage.set('Submitting vote...'); |
|
|
|
pageProgressMessage.set('Submitting vote...'); |
|
|
|
const { response, error } = await httpPost( |
|
|
|
const { response, error } = await httpPost( |
|
|
|
`${import.meta.env.PUBLIC_API_URL}/v1-vote-project/${solutionId}`, |
|
|
|
`${import.meta.env.PUBLIC_API_URL}/v1-vote-project/${solutionId}`, |
|
|
|