Skip to content

Commit c1a26ef

Browse files
fix: build errors
1 parent c2d6065 commit c1a26ef

5 files changed

Lines changed: 15 additions & 10 deletions

File tree

src/components/Analysis/AnalysisSidebar.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ import { useAnalysisController } from 'src/hooks/useAnalysisController'
1616
import type { MaiaEvaluation, StockfishEvaluation } from 'src/types'
1717

1818
type AnalysisViewMode = 'simple' | 'detailed'
19+
type HighlightBoardDescription = ComponentProps<
20+
typeof Highlight
21+
>['boardDescription']
1922

2023
interface Props {
2124
hover: (move?: string) => void
@@ -98,7 +101,7 @@ export const AnalysisSidebar: React.FC<Props> = ({
98101
stockfish: undefined,
99102
}
100103

101-
const highlightBoardDescription = analysisEnabled
104+
const highlightBoardDescription: HighlightBoardDescription = analysisEnabled
102105
? controller.boardDescription
103106
: {
104107
segments: [

src/components/Common/ErrorBoundary.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import Link from 'next/link'
22
import Head from 'next/head'
33
import { Component } from 'react'
4-
import { Open_Sans } from 'next/font/google'
54
import Chessground from '@react-chess/chessground'
65
import { Header } from './Header'
76
import { Footer } from './Footer'
@@ -17,7 +16,7 @@ interface State {
1716
error: Error | null
1817
}
1918

20-
const OpenSans = Open_Sans({ subsets: ['latin'] })
19+
const openSansClassName = 'font-sans'
2120

2221
export class ErrorBoundary extends Component<Props, State> {
2322
constructor(props: Props) {
@@ -67,7 +66,7 @@ export class ErrorBoundary extends Component<Props, State> {
6766
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=swap"
6867
/>
6968
</Head>
70-
<div className={`${OpenSans.className} app-container`}>
69+
<div className={`${openSansClassName} app-container`}>
7170
<div className="flex min-h-screen w-screen flex-col bg-backdrop">
7271
<Header />
7372
<div className="flex flex-1 flex-col items-center justify-center gap-4">
@@ -104,7 +103,7 @@ export class ErrorBoundary extends Component<Props, State> {
104103
/>
105104
</Head>
106105
<div
107-
className={`${OpenSans.className} app-container flex min-h-screen w-screen flex-col bg-backdrop`}
106+
className={`${openSansClassName} app-container flex min-h-screen w-screen flex-col bg-backdrop`}
108107
>
109108
<Header />
110109
<div className="flex flex-1 flex-col items-center justify-center gap-8 p-6">

src/components/Openings/OpeningDrillSidebar.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ export const OpeningDrillSidebar: React.FC<Props> = ({
6464
}
6565
}
6666

67+
const handleSetOrientation = (orientation: 'white' | 'black') => {
68+
tree?.setOrientation(orientation)
69+
}
70+
6771
return (
6872
<div className={containerClass}>
6973
{/* Current Drill Info */}
@@ -241,7 +245,7 @@ export const OpeningDrillSidebar: React.FC<Props> = ({
241245
<BoardController
242246
gameTree={tree.gameTree}
243247
orientation={tree.orientation}
244-
setOrientation={() => {}}
248+
setOrientation={handleSetOrientation}
245249
currentNode={tree.currentNode}
246250
plyCount={tree.plyCount}
247251
goToNode={tree.goToNode}

src/components/Openings/OpeningSelectionModal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1139,7 +1139,7 @@ export const OpeningSelectionModal: React.FC<Props> = ({
11391139
try {
11401140
if (fenTester.load(potentialFen)) {
11411141
detectedFen = potentialFen
1142-
inputLines.pop(0)
1142+
inputLines.shift()
11431143
remainingInput = inputLines.join(' ')
11441144
}
11451145
} catch (error) {

src/pages/_app.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { useRouter } from 'next/router'
55
import { useEffect } from 'react'
66
import type { AppProps } from 'next/app'
77
import posthog from 'posthog-js'
8-
import { Open_Sans } from 'next/font/google'
98
import { Analytics } from '@vercel/analytics/react'
109
import { PostHogProvider } from 'posthog-js/react'
1110
import { SoundProvider } from 'src/contexts/SoundContext'
@@ -34,7 +33,7 @@ import {
3433
FeedbackButton,
3534
} from 'src/components'
3635

37-
const OpenSans = Open_Sans({ subsets: ['latin'] })
36+
const openSansClassName = 'font-sans'
3837

3938
function MaiaPlatform({ Component, pageProps }: AppProps) {
4039
const router = useRouter()
@@ -107,7 +106,7 @@ function MaiaPlatform({ Component, pageProps }: AppProps) {
107106
<meta name="twitter:image" content="/embed.png" />
108107
<meta name="twitter:image:alt" content="Maia Chess" />
109108
</Head>
110-
<div className={`${OpenSans.className} app-container`}>
109+
<div className={`${openSansClassName} app-container`}>
111110
<Header />
112111
<div className="content-container">
113112
<Component {...pageProps} />

0 commit comments

Comments
 (0)