Skip to content

Commit

Permalink
fix(navbar): use root scheme for changelog dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
bjoerge committed Aug 15, 2022
1 parent fd11603 commit b6b8d5e
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {useModuleStatus} from '../../../../module-status'
import {StatusButton} from '../../StatusButton'
import {isDev} from '../../../../environment'
import {useClient} from '../../../../hooks'
import {useColorScheme} from '../../../colorScheme'
import {ChangelogDialog} from './ChangelogDialog'
import {ChangelogAccordion} from './ChangelogAccordion'

Expand All @@ -22,6 +23,9 @@ export function ChangelogButton() {
[client]
)

// get root scheme
const {scheme} = useColorScheme()

const {value, error, isLoading} = useModuleStatus({
client: versionedClient,
})
Expand All @@ -43,9 +47,10 @@ export function ChangelogButton() {
footer: <ChangelogAccordion defaultOpen={isDev} />,
onClickOutside: handleClose,
onClose: handleClose,
scheme: 'light',
// force root scheme here to "break out" of the navbar's dark scheme
scheme,
}),
[handleClose]
[handleClose, scheme]
)

if (error || isLoading || isUpToDate) {
Expand Down

0 comments on commit b6b8d5e

Please sign in to comment.