You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
670 B
JavaScript
22 lines
670 B
JavaScript
import { Markdown } from './Markdown.jsx'
|
|
|
|
export const Problem = ({ id, content, solutionsCount }) => {
|
|
return (
|
|
<div class="problem">
|
|
<div class="problem-header">
|
|
<div class="problem-title">
|
|
<a href={`/problem/${id}`}>Problema {id}</a>
|
|
</div>
|
|
</div>
|
|
<div class="problem-content">
|
|
<Markdown source={content} />
|
|
</div>
|
|
{solutionsCount > 0 && (
|
|
<div class="problem-footer">
|
|
{solutionsCount} soluzion{solutionsCount === 1 ? 'e' : 'i'}
|
|
</div>
|
|
)}
|
|
</div>
|
|
)
|
|
}
|