diff --git a/src/components/Projects/EmptySolutions.tsx b/src/components/Projects/EmptySolutions.tsx index dcaf5b591..28f1cce72 100644 --- a/src/components/Projects/EmptySolutions.tsx +++ b/src/components/Projects/EmptySolutions.tsx @@ -8,7 +8,7 @@ export function EmptySolutions(props: EmptySolutionsProps) { const { projectId } = props; return ( -
+

No solutions submitted yet diff --git a/src/components/Projects/ListProjectSolutions.tsx b/src/components/Projects/ListProjectSolutions.tsx index 2f10ec202..be67ef1fb 100644 --- a/src/components/Projects/ListProjectSolutions.tsx +++ b/src/components/Projects/ListProjectSolutions.tsx @@ -14,7 +14,7 @@ import { showLoginPopup } from '../../lib/popup'; import { VoteButton } from './VoteButton.tsx'; import { GitHubIcon } from '../ReactIcons/GitHubIcon.tsx'; import { SelectLanguages } from './SelectLanguages.tsx'; -import type { ProjectFileType, ProjectFrontmatter } from '../../lib/project.ts'; +import type { ProjectFrontmatter } from '../../lib/project.ts'; export interface ProjectStatusDocument { _id?: string; @@ -134,7 +134,7 @@ export function ListProjectSolutions(props: ListProjectSolutionsProps) { return; } - pageProgressMessage.set('Submitting vote...'); + pageProgressMessage.set('Submitting vote'); const { response, error } = await httpPost( `${import.meta.env.PUBLIC_API_URL}/v1-vote-project/${solutionId}`, { @@ -218,11 +218,14 @@ export function ListProjectSolutions(props: ListProjectSolutionsProps) { return (
{leavingRoadmapModal} -
-
+
+

{projectData.title} Solutions

+

{projectData.description}

+
+ {!isLoading && ( -
-

{projectData.description}

+ )}
{isLoading ? ( diff --git a/src/components/Projects/SelectLanguages.tsx b/src/components/Projects/SelectLanguages.tsx index 973a1b92c..bde1db0f2 100644 --- a/src/components/Projects/SelectLanguages.tsx +++ b/src/components/Projects/SelectLanguages.tsx @@ -1,42 +1,8 @@ import { useEffect, useRef, useState } from 'react'; -import { cn } from '../../lib/classname'; import { useOutsideClick } from '../../hooks/use-outside-click'; import { httpGet } from '../../lib/http'; import { useToast } from '../../hooks/use-toast'; - -const languageColors = new Map([ - ['JavaScript', 'bg-[#f1e05a]'], - ['Python', 'bg-[#3572A5]'], - ['Java', 'bg-[#b07219]'], - ['HTML', 'bg-[#e34c26]'], - ['CSS', 'bg-[#563d7c]'], - ['C++', 'bg-[#f34b7d]'], - ['C', 'bg-[#555555]'], - ['Go', 'bg-[#00ADD8]'], - ['TypeScript', 'bg-[#2b7489]'], - ['Shell', 'bg-[#89e051]'], - ['Ruby', 'bg-[#701516]'], - ['PHP', 'bg-[#4F5D95]'], - ['Rust', 'bg-[#dea584]'], - ['Swift', 'bg-[#ffac45]'], - ['Kotlin', 'bg-[#A97BFF]'], - ['Dart', 'bg-[#00B4AB]'], - ['Scala', 'bg-[#c22d40]'], - ['Objective-C', 'bg-[#438eff]'], - ['Vue', 'bg-[#41b883]'], - ['R', 'bg-[#198CE7]'], - ['Perl', 'bg-[#0298c3]'], - ['Haskell', 'bg-[#5e5086]'], - ['Lua', 'bg-[#000080]'], - ['Matlab', 'bg-[#e16737]'], - ['Vim script', 'bg-[#199f4b]'], - ['Elixir', 'bg-[#6e4a7e]'], - ['Erlang', 'bg-[#B83998]'], - ['Clojure', 'bg-[#db5855]'], - ['Markdown', 'bg-[#083fa1]'], - ['TeX', 'bg-[#3D6117]'], - ['SQL', 'bg-[#e38c00]'], -]); +import { ChevronDown, X } from 'lucide-react'; type SelectLanguagesProps = { projectId: string; @@ -77,11 +43,21 @@ export function SelectLanguages(props: SelectLanguagesProps) { return (
+ {selectedLanguage && ( + + )} {isOpen && (