From 5e728fc21aa9d50eb34239858e039b0161efe5f7 Mon Sep 17 00:00:00 2001 From: Jon Eugster Date: Wed, 5 Jul 2023 17:34:46 +0200 Subject: [PATCH] rename files --- client/src/components/game_menu.tsx | 2 +- client/src/components/infoview/main.tsx | 2 +- client/src/components/level.tsx | 4 ++-- client/src/{state => }/connection.ts | 0 client/src/{state => }/hooks.ts | 2 +- client/src/index.tsx | 2 +- client/src/state/api.ts | 2 +- client/src/state/store.ts | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) rename client/src/{state => }/connection.ts (100%) rename client/src/{state => }/hooks.ts (82%) diff --git a/client/src/components/game_menu.tsx b/client/src/components/game_menu.tsx index 87c10b1..2dec139 100644 --- a/client/src/components/game_menu.tsx +++ b/client/src/components/game_menu.tsx @@ -5,7 +5,7 @@ import { faDownload, faUpload, faEraser } from '@fortawesome/free-solid-svg-icon import { Button } from './button' import { GameIdContext } from './infoview/context'; -import { useAppDispatch, useAppSelector } from '../state/hooks'; +import { useAppDispatch, useAppSelector } from '../hooks'; import { deleteProgress, selectProgress, loadProgress, GameProgressState } from '../state/progress'; const downloadFile = ({ data, fileName, fileType }) => { diff --git a/client/src/components/infoview/main.tsx b/client/src/components/infoview/main.tsx index d385ff5..1bb0048 100644 --- a/client/src/components/infoview/main.tsx +++ b/client/src/components/infoview/main.tsx @@ -15,7 +15,7 @@ import { WithRpcSessions } from '../../../../node_modules/lean4-infoview/src/inf import { ServerVersion } from '../../../../node_modules/lean4-infoview/src/infoview/serverVersion'; import { GameIdContext } from './context'; -import { useAppDispatch, useAppSelector } from '../../state/hooks'; +import { useAppDispatch, useAppSelector } from '../../hooks'; import { LevelInfo } from '../../state/api'; import { levelCompleted, selectCompleted } from '../../state/progress'; import Markdown from '../markdown'; diff --git a/client/src/components/level.tsx b/client/src/components/level.tsx index 19afc8f..6a5590f 100644 --- a/client/src/components/level.tsx +++ b/client/src/components/level.tsx @@ -31,8 +31,8 @@ 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 { ConnectionContext, useLeanClient } from '../state/connection'; -import { useAppDispatch, useAppSelector } from '../state/hooks'; +import { ConnectionContext, useLeanClient } from '../connection'; +import { useAppDispatch, useAppSelector } from '../hooks'; import { Button } from './button' import Markdown from './markdown'; import {Inventory, Documentation} from './inventory'; diff --git a/client/src/state/connection.ts b/client/src/connection.ts similarity index 100% rename from client/src/state/connection.ts rename to client/src/connection.ts diff --git a/client/src/state/hooks.ts b/client/src/hooks.ts similarity index 82% rename from client/src/state/hooks.ts rename to client/src/hooks.ts index 60a4163..afdce0a 100644 --- a/client/src/state/hooks.ts +++ b/client/src/hooks.ts @@ -1,5 +1,5 @@ import { TypedUseSelectorHook, useDispatch, useSelector } from 'react-redux' -import type { RootState, AppDispatch } from './store' +import type { RootState, AppDispatch } from './state/store' // Use throughout your app instead of plain `useDispatch` and `useSelector` export const useAppDispatch: () => AppDispatch = useDispatch diff --git a/client/src/index.tsx b/client/src/index.tsx index 4146aaf..2b593c6 100644 --- a/client/src/index.tsx +++ b/client/src/index.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import { createRoot } from 'react-dom/client'; import App from './app'; -import { ConnectionContext, connection } from './state/connection' +import { ConnectionContext, connection } from './connection' import { store } from './state/store'; import { Provider } from 'react-redux'; import { diff --git a/client/src/state/api.ts b/client/src/state/api.ts index 19c4c5e..349b905 100644 --- a/client/src/state/api.ts +++ b/client/src/state/api.ts @@ -1,5 +1,5 @@ import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query/react' -import { Connection } from './connection' +import { Connection } from '../connection' interface GameInfo { title: null|string, diff --git a/client/src/state/store.ts b/client/src/state/store.ts index f6bfd4c..94746ce 100644 --- a/client/src/state/store.ts +++ b/client/src/state/store.ts @@ -1,7 +1,7 @@ import { configureStore } from '@reduxjs/toolkit'; import { debounce } from "debounce"; -import { connection } from './connection' +import { connection } from '../connection' import { apiSlice } from './api' import { progressSlice } from './progress' import { saveState } from "./local_storage";