diff --git a/pkg/grid/src/components/icons/LeftArrow.tsx b/pkg/grid/src/components/icons/LeftArrow.tsx new file mode 100644 index 0000000000..b6a98f8b5e --- /dev/null +++ b/pkg/grid/src/components/icons/LeftArrow.tsx @@ -0,0 +1,15 @@ +import React, { HTMLAttributes } from 'react'; + +type LeftArrowProps = HTMLAttributes; + +export const LeftArrow = (props: LeftArrowProps) => ( + + + +); diff --git a/pkg/grid/src/nav/SystemPreferences.tsx b/pkg/grid/src/nav/SystemPreferences.tsx index 7cd3f724f6..015e9edb47 100644 --- a/pkg/grid/src/nav/SystemPreferences.tsx +++ b/pkg/grid/src/nav/SystemPreferences.tsx @@ -11,6 +11,8 @@ import { useCharges } from '../state/docket'; import { AppPrefs } from './preferences/AppPrefs'; import { DocketImage } from '../components/DocketImage'; import { ErrorAlert } from '../components/ErrorAlert'; +import { useMedia } from '../logic/useMedia'; +import { LeftArrow } from '../components/icons/LeftArrow'; interface SystemPreferencesSectionProps { url: string; @@ -43,9 +45,15 @@ export const SystemPreferences = (props: RouteComponentProps<{ submenu: string } `${match.url}/:submenu/:desk?` ); const charges = useCharges(); + const isMobile = useMedia('(max-width: 639px)'); + const settingsPath = isMobile ? `${match.url}/:submenu` : '/'; const matchSub = useCallback( (target: string, desk?: string) => { + if (isMobile) { + return false; + } + if (!subMatch && target === 'notifications') { return true; } @@ -66,54 +74,68 @@ export const SystemPreferences = (props: RouteComponentProps<{ submenu: string } FallbackComponent={ErrorAlert} onReset={() => history.push('/leap/system-preferences')} > -
- + + +
+ + + + + + + + Back + +
+
);