This commit is contained in:
@@ -13,18 +13,6 @@ import { useLoggedInUser } from '../hooks/useCurrentUser'
|
||||
import QRCode from 'react-qr-code'
|
||||
|
||||
export const JumbotronPage = ({}) => {
|
||||
const metadata = useContext(MetadataContext)
|
||||
const db = useContext(DatabaseContext)
|
||||
if (db) {
|
||||
useServerAsyncCallback(async () => {
|
||||
const problem = await db.getJumbotronProblem()
|
||||
if (problem) {
|
||||
metadata.title = `PHC Problemi | ${problem.title}`
|
||||
metadata.description = problem.content
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const [problem] = useResource<ProblemModel | null>(`/api/jumbotron`, null, problem => {
|
||||
if (problem === null) {
|
||||
route(prependBaseUrl(`/error?message=${encodeURIComponent(`Il problema jumbotron non esiste`)}`))
|
||||
|
||||
Reference in New Issue
Block a user