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, status, adminControls }: Props) => { return (
Soluzione {sentBy && ( <> {' '} di @{sentBy} )} {forProblem && ( <> {' '} per il Problema {forProblem} )}
{status && (