fix: ehm in realtà le pagine utente non funzionavano per niente

This commit is contained in:
2023-01-12 14:36:09 +01:00
parent fab8398a7a
commit 8a911f5ddb
9 changed files with 47 additions and 35 deletions
+2 -2
View File
@@ -3,7 +3,7 @@ import { JSX } from 'preact/jsx-runtime'
import { ProblemId, Solution as SolutionModel, SolutionId, SolutionStatus, UserId } from '../../shared/model'
import { prependBaseUrl } from '../../shared/utils'
import { server } from '../api'
import { useCurrentUser } from '../hooks/useCurrentUser'
import { useLoggedInUser } from '../hooks/useCurrentUser'
import { Markdown } from './Markdown'
const STATUS_SELECT_OPTIONS: Record<SolutionStatus, JSX.Element> = {
@@ -37,7 +37,7 @@ export const Solution = ({
setSolution,
refreshSolution,
}: Props) => {
const [user] = useCurrentUser()
const [user] = useLoggedInUser()
const markAsCorrect = async () => {
setSolution?.(prevSolution => ({ ...prevSolution, status: 'correct' }))