File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- import { type CSSProperties , useState } from "react" ;
1+ import type { CSSProperties } from "react" ;
22
33import { useTheme } from "@/shared/hooks/use-theme" ;
44import { Bar , Container , Section } from "@column-resizer/react" ;
@@ -20,9 +20,10 @@ import { useRevealMainWindow } from "@/features/shell/use-reveal-main-window";
2020import { useShellController } from "@/features/shell/use-shell-controller" ;
2121import { useUIStore } from "@/features/settings/store/use-ui-store" ;
2222
23+ const IS_MACOS = navigator . userAgent . includes ( "Mac" ) ;
24+
2325function App ( ) {
2426 useTheme ( ) ;
25- const [ isMacos ] = useState ( ( ) => navigator . userAgent . includes ( "Mac" ) ) ;
2627 const {
2728 bootstrapError,
2829 chooseConflictDialogProps,
@@ -60,12 +61,12 @@ function App() {
6061 className = "text-foreground relative h-full min-h-0 overflow-hidden"
6162 style = {
6263 {
63- "--titlebar-height" : isMacos ? "3.25rem" : "0px" ,
64+ "--titlebar-height" : IS_MACOS ? "3.25rem" : "0px" ,
6465 } as CSSProperties
6566 }
6667 >
6768 < div className = "relative h-full min-h-0" >
68- { isMacos ? (
69+ { IS_MACOS ? (
6970 < div
7071 className = "absolute inset-x-0 top-0 z-30 h-(--titlebar-height)"
7172 data-tauri-drag-region
You can’t perform that action at this time.
0 commit comments