Skip to content

Commit 2418d48

Browse files
fix: build errors
1 parent 2ae3fb6 commit 2418d48

3 files changed

Lines changed: 36 additions & 9 deletions

File tree

src/pages/_app.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ function MaiaPlatform({ Component, pageProps }: AppProps) {
3232
const isAnalysisPage = router.pathname.startsWith('/analysis')
3333

3434
useEffect(() => {
35-
posthog.init(process.env.NEXT_PUBLIC_POSTHOG_KEY!, {
35+
posthog.init(process.env.NEXT_PUBLIC_POSTHOG_KEY as string, {
3636
api_host: '/ingest',
3737
ui_host: 'https://us.posthog.com',
3838
defaults: '2025-05-24',

src/pages/train.tsx

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -787,7 +787,15 @@ const Train: React.FC<Props> = ({
787787
boardDescription={
788788
showAnalysis
789789
? analysisController.boardDescription
790-
: 'This position offers multiple strategic options. Consider central control and piece development.'
790+
: {
791+
segments: [
792+
{
793+
type: 'text',
794+
content:
795+
'This position offers multiple strategic options. Consider central control and piece development.',
796+
},
797+
],
798+
}
791799
}
792800
/>
793801
{!showAnalysis && (
@@ -861,7 +869,15 @@ const Train: React.FC<Props> = ({
861869
boardDescription={
862870
showAnalysis
863871
? analysisController.boardDescription
864-
: 'This position offers multiple strategic options. Consider central control and piece development.'
872+
: {
873+
segments: [
874+
{
875+
type: 'text',
876+
content:
877+
'This position offers multiple strategic options. Consider central control and piece development.',
878+
},
879+
],
880+
}
865881
}
866882
/>
867883
</div>
@@ -1187,7 +1203,15 @@ const Train: React.FC<Props> = ({
11871203
boardDescription={
11881204
showAnalysis
11891205
? analysisController.boardDescription
1190-
: 'This position offers multiple strategic options. Consider central control and piece development.'
1206+
: {
1207+
segments: [
1208+
{
1209+
type: 'text',
1210+
content:
1211+
'This position offers multiple strategic options. Consider central control and piece development.',
1212+
},
1213+
],
1214+
}
11911215
}
11921216
/>
11931217
{!showAnalysis && (

src/utils/posthog.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,13 @@ import { PostHog } from 'posthog-node'
22

33
// NOTE: This is a Node.js client for sending events from the server side to PostHog.
44
export default function PostHogClient(): PostHog {
5-
const posthogClient = new PostHog(process.env.NEXT_PUBLIC_POSTHOG_KEY!, {
6-
host: process.env.NEXT_PUBLIC_POSTHOG_HOST,
7-
flushAt: 1,
8-
flushInterval: 0,
9-
})
5+
const posthogClient = new PostHog(
6+
process.env.NEXT_PUBLIC_POSTHOG_KEY as string,
7+
{
8+
host: process.env.NEXT_PUBLIC_POSTHOG_HOST,
9+
flushAt: 1,
10+
flushInterval: 0,
11+
},
12+
)
1013
return posthogClient
1114
}

0 commit comments

Comments
 (0)