diff --git a/client/components/Problem.tsx b/client/components/Problem.tsx
index a048a8b..4ae1a06 100644
--- a/client/components/Problem.tsx
+++ b/client/components/Problem.tsx
@@ -17,7 +17,7 @@ export const Problem = ({ id, content, solutionsCount }: Props) => {
- {solutionsCount && solutionsCount > 0 && (
+ {solutionsCount !== undefined && solutionsCount > 0 && (
diff --git a/client/components/Solution.tsx b/client/components/Solution.tsx
index 22a88e8..3a98def 100644
--- a/client/components/Solution.tsx
+++ b/client/components/Solution.tsx
@@ -1,16 +1,25 @@
+import { JSX } from 'preact/jsx-runtime'
import { ProblemId, SolutionStatus, UserId } from '../../shared/model'
import { Markdown } from './Markdown'
+import { Select } from './Select'
+
+const STATUS_SELECT_OPTIONS: Record = {
+ ['pending']: Soluzione in attesa di correzione
,
+ ['correct']: Soluzione corretta
,
+ ['wrong']: Soluzione sbagliata
,
+}
type Props = {
sentBy?: UserId
forProblem: ProblemId
content: string
status?: SolutionStatus
+ adminControls: boolean
}
-export const Solution = ({ sentBy, forProblem, content }: Props) => {
+export const Solution = ({ sentBy, forProblem, content, status, adminControls }: Props) => {
return (
-