isDark is a string in Swift so we need to check for "true"

This commit is contained in:
Jackson Harper 2022-08-29 11:31:07 +08:00
parent b63c9b0265
commit 2beb75d747
2 changed files with 4 additions and 4 deletions

File diff suppressed because one or more lines are too long

View file

@ -125,12 +125,12 @@ export function ArticleContainer(props: ArticleContainerProps): JSX.Element {
}
interface UpdateColorModeEvent extends Event {
isDark?: boolean
isDark?: string
}
const updateColorMode = (event: UpdateColorModeEvent) => {
const isDark = event.isDark ?? false
updateThemeLocally(isDark ? ThemeId.Dark : ThemeId.Light)
const isDark = event.isDark ?? "false"
updateThemeLocally(isDark === "true" ? ThemeId.Dark : ThemeId.Light)
}
const share = () => {