From 15ffb52ebbfcce4939d610d6b2003b7c63f8e4b5 Mon Sep 17 00:00:00 2001 From: Faisal Amir Date: Tue, 17 Dec 2024 09:54:17 +0700 Subject: [PATCH] fix: starter screen layout --- web/containers/CenterPanelContainer/index.tsx | 9 +++++++-- .../ChatBody/OnDeviceStarterScreen/index.tsx | 8 ++++++-- web/screens/Thread/index.tsx | 2 +- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/web/containers/CenterPanelContainer/index.tsx b/web/containers/CenterPanelContainer/index.tsx index fb2518dc77..b3df8face4 100644 --- a/web/containers/CenterPanelContainer/index.tsx +++ b/web/containers/CenterPanelContainer/index.tsx @@ -18,19 +18,24 @@ import { } from '@/helpers/atoms/App.atom' import { reduceTransparentAtom } from '@/helpers/atoms/Setting.atom' -const CenterPanelContainer = ({ children }: PropsWithChildren) => { +type Props = { + isShowStarterScreen?: boolean +} & PropsWithChildren + +const CenterPanelContainer = ({ children, isShowStarterScreen }: Props) => { const reduceTransparent = useAtomValue(reduceTransparentAtom) const matches = useMediaQuery('(max-width: 880px)') const showLeftPanel = useAtomValue(showLeftPanelAtom) const showRightPanel = useAtomValue(showRightPanelAtom) const mainViewState = useAtomValue(mainViewStateAtom) + return (
{ +type Props = { + isShowStarterScreen?: boolean +} + +const OnDeviceStarterScreen = ({ isShowStarterScreen }: Props) => { const { extensionHasSettings } = useStarterScreen() const [searchValue, setSearchValue] = useState('') const [isOpen, setIsOpen] = useState(Boolean(searchValue.length)) @@ -103,7 +107,7 @@ const OnDeviceStarterScreen = () => { const [visibleRows, setVisibleRows] = useState(1) return ( - +
diff --git a/web/screens/Thread/index.tsx b/web/screens/Thread/index.tsx index 6789c181d4..c3963067a0 100644 --- a/web/screens/Thread/index.tsx +++ b/web/screens/Thread/index.tsx @@ -17,7 +17,7 @@ type Props = { const ThreadPanels = memo(({ isShowStarterScreen }: Props) => { return isShowStarterScreen ? ( - + ) : ( <>