Skip to content

Commit 1e94e9e

Browse files
feat: modularize + clean up
1 parent 5dee7d7 commit 1e94e9e

44 files changed

Lines changed: 119 additions & 2636 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/components/Analysis/LegacyAnalysisGameList.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
import { motion } from 'framer-motion'
1111

1212
import { Tournament, UserGameList } from 'src/components'
13-
import { AnalysisListContext, GameControllerContext } from 'src/contexts'
13+
import { AnalysisListContext, TreeControllerContext } from 'src/contexts'
1414

1515
interface LegacyAnalysisGameListProps {
1616
currentId: string[] | null
@@ -44,7 +44,7 @@ export const LegacyAnalysisGameList: React.FC<LegacyAnalysisGameListProps> = ({
4444
'tournament' | 'pgn' | 'play' | 'hand' | 'brain'
4545
>('pgn')
4646

47-
const controller = useContext(GameControllerContext)
47+
const controller = useContext(TreeControllerContext)
4848
const {
4949
analysisPlayList,
5050
analysisHandList,

src/components/Board/AnalysisGameBoard.tsx

Lines changed: 0 additions & 135 deletions
This file was deleted.

src/components/Board/AnalysisMovesContainer.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* eslint-disable jsx-a11y/no-static-element-interactions */
22
/* eslint-disable jsx-a11y/click-events-have-key-events */
33
import React, { useContext, useMemo, Fragment, useEffect } from 'react'
4-
import { AnalysisGameControllerContext, WindowSizeContext } from 'src/contexts'
4+
import { TreeControllerContext, WindowSizeContext } from 'src/contexts'
55
import { GameNode, AnalyzedGame, Termination, ClientBaseGame } from 'src/types'
66
import { Tooltip } from 'react-tooltip'
77

@@ -88,7 +88,7 @@ export const AnalysisMovesContainer: React.FC<Props> = ({
8888
highlightIndices,
8989
termination,
9090
}: Props) => {
91-
const { currentNode, goToNode } = useContext(AnalysisGameControllerContext)
91+
const { currentNode, goToNode } = useContext(TreeControllerContext)
9292

9393
const { isMobile } = useContext(WindowSizeContext)
9494

src/components/Board/BoardController.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { useCallback, useContext, useEffect, useMemo } from 'react'
22

33
import { useWindowSize } from 'src/hooks'
4-
import { GameControllerContext } from 'src/contexts/'
4+
import { TreeControllerContext } from 'src/contexts/'
55
import { FlipIcon } from 'src/components/Icons/icons'
66

77
interface Props {
@@ -16,7 +16,7 @@ export const BoardController: React.FC<Props> = ({ setCurrentMove }: Props) => {
1616
setCurrentIndex,
1717
currentIndex,
1818
plyCount,
19-
} = useContext(GameControllerContext)
19+
} = useContext(TreeControllerContext)
2020
const toggleBoardOrientation = useCallback(() => {
2121
setOrientation(orientation === 'white' ? 'black' : 'white')
2222
}, [orientation, setOrientation])

src/components/Board/GameBoard.tsx

Lines changed: 0 additions & 122 deletions
This file was deleted.

0 commit comments

Comments
 (0)