.
This commit is contained in:
+2
-1
@@ -8,7 +8,8 @@ import '@fontsource/roboto/700.css';
|
||||
|
||||
import './reset.css';
|
||||
import './app.css';
|
||||
import { GameIdContext } from './components/infoview/context';
|
||||
|
||||
export const GameIdContext = React.createContext<string>(undefined);
|
||||
|
||||
function App() {
|
||||
const params = useParams();
|
||||
|
||||
@@ -4,7 +4,7 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
|
||||
import { faDownload, faUpload, faEraser } from '@fortawesome/free-solid-svg-icons'
|
||||
|
||||
import { Button } from './button'
|
||||
import { GameIdContext } from './infoview/context';
|
||||
import { GameIdContext } from '../app';
|
||||
import { useAppDispatch, useAppSelector } from '../hooks';
|
||||
import { deleteProgress, selectProgress, loadProgress, GameProgressState } from '../state/progress';
|
||||
|
||||
|
||||
@@ -6,8 +6,6 @@ import * as monaco from 'monaco-editor/esm/vs/editor/editor.api.js'
|
||||
import { InteractiveDiagnostic, InteractiveTermGoal } from '@leanprover/infoview-api';
|
||||
import { InteractiveGoals } from './rpc_api';
|
||||
|
||||
export const GameIdContext = React.createContext<string>(undefined);
|
||||
|
||||
export const MonacoEditorContext = React.createContext<monaco.editor.IStandaloneCodeEditor>(
|
||||
null as any)
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ import { EditorContext, ConfigContext, ProgressContext, VersionContext } from '.
|
||||
import { WithRpcSessions } from '../../../../node_modules/lean4-infoview/src/infoview/rpcSessions';
|
||||
import { ServerVersion } from '../../../../node_modules/lean4-infoview/src/infoview/serverVersion';
|
||||
|
||||
import { GameIdContext } from './context';
|
||||
import { GameIdContext } from '../../app';
|
||||
import { useAppDispatch, useAppSelector } from '../../hooks';
|
||||
import { LevelInfo } from '../../state/api';
|
||||
import { levelCompleted, selectCompleted } from '../../state/progress';
|
||||
|
||||
@@ -3,7 +3,7 @@ import { useState, useEffect } from 'react';
|
||||
import './inventory.css'
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
|
||||
import { faLock, faLockOpen, faBook, faHammer, faBan } from '@fortawesome/free-solid-svg-icons'
|
||||
import { GameIdContext } from './infoview/context';
|
||||
import { GameIdContext } from '../app';
|
||||
import Markdown from './markdown';
|
||||
import { useLoadDocQuery, InventoryTile, LevelInfo } from '../state/api';
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ import { faHome, faArrowRight, faArrowLeft, faRotateLeft } from '@fortawesome/fr
|
||||
import { styled, useTheme, Theme, CSSObject } from '@mui/material/styles';
|
||||
import { DocumentPosition } from '../../../node_modules/lean4-infoview/src/infoview/util';
|
||||
|
||||
import { GameIdContext } from './infoview/context';
|
||||
import { GameIdContext } from '../app';
|
||||
import { ConnectionContext, useLeanClient } from '../connection';
|
||||
import { useAppDispatch, useAppSelector } from '../hooks';
|
||||
import { Button } from './button'
|
||||
|
||||
@@ -8,7 +8,7 @@ import { Box, Typography, CircularProgress } from '@mui/material';
|
||||
import cytoscape, { LayoutOptions } from 'cytoscape'
|
||||
import klay from 'cytoscape-klay';
|
||||
import './welcome.css'
|
||||
import { GameIdContext } from './infoview/context';
|
||||
import { GameIdContext } from '../app';
|
||||
import { selectCompleted } from '../state/progress';
|
||||
import { useGetGameInfoQuery } from '../state/api';
|
||||
import Markdown from './markdown';
|
||||
|
||||
Reference in New Issue
Block a user