Skip to content

Commit

Permalink
Fixes issue with OverlayEggGraph props.
Browse files Browse the repository at this point in the history
  • Loading branch information
mntone committed Jun 25, 2024
1 parent ed9f505 commit 5b6c357
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/modules/overlay/components/OverlayEggGraph/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { useRef } from 'react'
import { connect } from 'react-redux'

import EggGraph, { type EggGraphProps } from '@/core/components/EggGraph'
import type { GraphLayoutProps } from '@/core/models/graph'
import type { GraphRootProps } from '@/core/models/graph'

import { RootState } from 'app/store'

Expand All @@ -21,7 +21,7 @@ const preferredGraphLayout = Object.freeze({
height: 192 - 48 - 32,
containerWidth: '100%',
containerHeight: '100%',
} satisfies GraphLayoutProps)
} satisfies GraphRootProps)

const preferredGraphLayoutWithStatus = Object.freeze({
marginTop: 48, // 3.0em in 720p (1em = 16px @ 720p, 1em = 24px @ 1080p)
Expand All @@ -33,11 +33,11 @@ const preferredGraphLayoutWithStatus = Object.freeze({
height: 288 - 48 - 32,
containerWidth: '100%',
containerHeight: '100%',
} satisfies GraphLayoutProps)
} satisfies GraphRootProps)

type OverlayEggGraphProps =
& { readonly visible: boolean }
& Omit<EggGraphProps, keyof GraphLayoutProps>
& Omit<EggGraphProps, keyof GraphRootProps>

export const OverlayEggGraph = function (props: OverlayEggGraphProps) {
const { status, visible, ...nextProps } = props
Expand Down Expand Up @@ -69,7 +69,7 @@ function mapStateToProps(state: RootState) {
return {
colorLock: state.config.colorLock,
telemetry,
status: state.config.status ?? true,
status: state.config.status ?? false,
visible: telemetry !== undefined && wave !== undefined,
wave,
} satisfies OverlayEggGraphProps
Expand Down

0 comments on commit 5b6c357

Please sign in to comment.