chore: Rimossi alcuni import inutilizzati
This commit is contained in:
@@ -1,13 +1,13 @@
|
|||||||
import { route } from 'preact-router'
|
import { route } from 'preact-router'
|
||||||
import { useState } from 'preact/hooks'
|
import { useState } from 'preact/hooks'
|
||||||
import { isAdministrator, isStudent, Solution as SolutionModel, SolutionId } from '../../shared/model'
|
import { isStudent, Solution as SolutionModel, SolutionId } from '../../shared/model'
|
||||||
import { sortByStringKey } from '../../shared/utils'
|
import { sortByStringKey } from '../../shared/utils'
|
||||||
import { prependBaseUrl, server } from '../api'
|
import { prependBaseUrl, server } from '../api'
|
||||||
import { Header } from '../components/Header'
|
import { Header } from '../components/Header'
|
||||||
import { MarkdownEditor } from '../components/MarkdownEditor'
|
import { MarkdownEditor } from '../components/MarkdownEditor'
|
||||||
import { Select } from '../components/Select'
|
import { Select } from '../components/Select'
|
||||||
import { Solution } from '../components/Solution'
|
import { Solution } from '../components/Solution'
|
||||||
import { useCurrentUser, useListResource, useResource } from '../hooks'
|
import { useCurrentUser, useListResource } from '../hooks'
|
||||||
|
|
||||||
const CreateProblem = ({}) => {
|
const CreateProblem = ({}) => {
|
||||||
const [source, setSource] = useState('')
|
const [source, setSource] = useState('')
|
||||||
@@ -38,8 +38,7 @@ export const AdminPage = ({}) => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
const [solutions, refreshSolutions, setSolutionHeuristic] =
|
const [solutions, refreshSolutions, setSolutionHeuristic] = useListResource<SolutionModel>(`/api/solutions`)
|
||||||
useListResource<SolutionModel>(`/api/solutions`)
|
|
||||||
|
|
||||||
const [sortOrder, setSortOrder] = useState<SortOrder>('oldest')
|
const [sortOrder, setSortOrder] = useState<SortOrder>('oldest')
|
||||||
|
|
||||||
@@ -47,8 +46,7 @@ export const AdminPage = ({}) => {
|
|||||||
|
|
||||||
const [trackInteracted, setTrackedInteracted] = useState<Set<SolutionId>>(new Set())
|
const [trackInteracted, setTrackedInteracted] = useState<Set<SolutionId>>(new Set())
|
||||||
|
|
||||||
const hasUntrackedPending =
|
const hasUntrackedPending = sortedSolutions.filter(s => s.status === 'pending' || trackInteracted.has(s.id)).length > 0
|
||||||
sortedSolutions.filter(s => s.status === 'pending' || trackInteracted.has(s.id)).length > 0
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
user && (
|
user && (
|
||||||
|
|||||||
Reference in New Issue
Block a user