fix: default to notes list on launch on mobile (#1599)
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
import { ElementIds } from '@/Constants/ElementIDs'
|
import { ElementIds } from '@/Constants/ElementIDs'
|
||||||
|
import { isMobileScreen } from '@/Utils'
|
||||||
import { useEffect, ReactNode, useMemo, createContext, useCallback, useContext, useState } from 'react'
|
import { useEffect, ReactNode, useMemo, createContext, useCallback, useContext, useState } from 'react'
|
||||||
import { AppPaneId } from './AppPaneMetadata'
|
import { AppPaneId } from './AppPaneMetadata'
|
||||||
|
|
||||||
@@ -24,8 +25,12 @@ type Props = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const ResponsivePaneProvider = ({ children }: Props) => {
|
const ResponsivePaneProvider = ({ children }: Props) => {
|
||||||
const [currentSelectedPane, setCurrentSelectedPane] = useState<AppPaneId>(AppPaneId.Editor)
|
const [currentSelectedPane, setCurrentSelectedPane] = useState<AppPaneId>(
|
||||||
const [previousSelectedPane, setPreviousSelectedPane] = useState<AppPaneId>(AppPaneId.Editor)
|
isMobileScreen() ? AppPaneId.Items : AppPaneId.Editor,
|
||||||
|
)
|
||||||
|
const [previousSelectedPane, setPreviousSelectedPane] = useState<AppPaneId>(
|
||||||
|
isMobileScreen() ? AppPaneId.Items : AppPaneId.Editor,
|
||||||
|
)
|
||||||
|
|
||||||
const toggleAppPane = useCallback(
|
const toggleAppPane = useCallback(
|
||||||
(paneId: AppPaneId) => {
|
(paneId: AppPaneId) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user