|
|
|
@ -1,6 +1,7 @@
|
|
|
|
|
import { useContext, useState } from 'preact/hooks'
|
|
|
|
|
import { SolutionStat } from '../../shared/model'
|
|
|
|
|
import { sortByNumericKey, sortByStringKey } from '../../shared/utils'
|
|
|
|
|
import { prependBaseUrl } from '../api'
|
|
|
|
|
import { Header } from '../components/Header'
|
|
|
|
|
|
|
|
|
|
import { useResource, MetadataContext } from '../hooks'
|
|
|
|
@ -49,6 +50,7 @@ export const ScoresPage = () => {
|
|
|
|
|
<Header />
|
|
|
|
|
<main class="page-scores">
|
|
|
|
|
<div class="subtitle">Classifica</div>
|
|
|
|
|
<div class="scrollable">
|
|
|
|
|
<div class="table">
|
|
|
|
|
<div class="cell header">
|
|
|
|
|
<span>Studente</span>
|
|
|
|
@ -88,12 +90,15 @@ export const ScoresPage = () => {
|
|
|
|
|
</div>
|
|
|
|
|
{orderedStats.map(([user, s]) => (
|
|
|
|
|
<>
|
|
|
|
|
<div class="cell">{user}</div>
|
|
|
|
|
<div class="cell">
|
|
|
|
|
<a href={prependBaseUrl(`/u/${user}`)}>@{user}</a>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="cell">{s.sentSolutionsCount}</div>
|
|
|
|
|
<div class="cell">{s.correctSolutionsCount}</div>
|
|
|
|
|
</>
|
|
|
|
|
))}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</main>
|
|
|
|
|
</>
|
|
|
|
|
)
|
|
|
|
|