diff --git a/packages/interface/src/App.tsx b/packages/interface/src/App.tsx index bc8b92835..ba17ab872 100644 --- a/packages/interface/src/App.tsx +++ b/packages/interface/src/App.tsx @@ -61,11 +61,10 @@ export interface AppProps { } function AppLayout() { - const appPropsContext = useContext(AppPropsContext); + const appProps = useContext(AppPropsContext); - const isWindowRounded = appPropsContext?.platform === 'macOS'; - const hasWindowBorder = - appPropsContext?.platform !== 'browser' && appPropsContext?.platform !== 'windows'; + const isWindowRounded = appProps?.platform === 'macOS'; + const hasWindowBorder = appProps?.platform !== 'browser' && appProps?.platform !== 'windows'; return (
// ); // }; + return (
- {/* @ts-ignore */} - {props.iconName && icons[props.iconName] ? ( + {props.iconName && icons[props.iconName as keyof typeof icons] ? ( (() => { - // @ts-ignore - let Icon = icons[props.iconName]; + const Icon = icons[props.iconName as keyof typeof icons]; return ( ); diff --git a/packages/interface/src/components/file/FileList.tsx b/packages/interface/src/components/file/FileList.tsx index b6ac631f5..a72e591c6 100644 --- a/packages/interface/src/components/file/FileList.tsx +++ b/packages/interface/src/components/file/FileList.tsx @@ -219,7 +219,7 @@ const RenderCell: React.FC<{ if (!file || !colKey || !dirId) return <>; const row = file; if (!row) return <>; - const appPropsContext = useContext(AppPropsContext); + const appProps = useContext(AppPropsContext); const value = row[colKey]; if (!value) return <>; diff --git a/packages/interface/src/components/file/FileThumb.tsx b/packages/interface/src/components/file/FileThumb.tsx index a120b192f..cf306d230 100644 --- a/packages/interface/src/components/file/FileThumb.tsx +++ b/packages/interface/src/components/file/FileThumb.tsx @@ -13,7 +13,7 @@ export default function FileThumb(props: { hasThumbnailOverride: boolean; className?: string; }) { - const appPropsContext = useContext(AppPropsContext); + const appProps = useContext(AppPropsContext); const { data: client } = useBridgeQuery('NodeGetState'); if (props.file.is_dir) { @@ -24,7 +24,7 @@ export default function FileThumb(props: { return ( diff --git a/packages/interface/src/components/file/Sidebar.tsx b/packages/interface/src/components/file/Sidebar.tsx index fca0cc3a0..24e4c47be 100644 --- a/packages/interface/src/components/file/Sidebar.tsx +++ b/packages/interface/src/components/file/Sidebar.tsx @@ -55,14 +55,14 @@ export const MacWindowControlsSpace: React.FC<{ }; export function MacWindowControls() { - const appPropsContext = useContext(AppPropsContext); + const appProps = useContext(AppPropsContext); return ( @@ -72,7 +72,7 @@ export function MacWindowControls() { export const Sidebar: React.FC = (props) => { const { isExperimental } = useNodeStore(); - const appPropsContext = useContext(AppPropsContext); + const appProps = useContext(AppPropsContext); const { data: locations } = useBridgeQuery('SysGetLocations'); const { data: clientState } = useBridgeQuery('NodeGetState'); @@ -88,11 +88,10 @@ export const Sidebar: React.FC = (props) => { return (
- {appPropsContext?.platform === 'browser' && - window.location.search.includes('showControls') ? ( + {appProps?.platform === 'browser' && window.location.search.includes('showControls') ? ( ) : null} - {appPropsContext?.platform === 'macOS' ? : null} + {appProps?.platform === 'macOS' ? : null} = (props) => {