feat: change to center and clean code
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import { AiMoudle, useAiStore } from '@/pages/ai-chat';
|
||||
import { MenuOutlined, SwapOutlined } from '@ant-design/icons';
|
||||
import { Button, Tooltip } from 'antd';
|
||||
import { Outlet } from 'react-router-dom';
|
||||
@@ -39,11 +38,7 @@ export const LayoutMain = (props: LayoutMainProps) => {
|
||||
}),
|
||||
);
|
||||
const { isMac, mount, isElectron } = platformStore;
|
||||
const aiStore = useAiStore(
|
||||
useShallow((state) => {
|
||||
return { open: state.open };
|
||||
}),
|
||||
);
|
||||
|
||||
useLayoutEffect(() => {
|
||||
platformStore.init();
|
||||
}, []);
|
||||
@@ -106,12 +101,10 @@ export const LayoutMain = (props: LayoutMainProps) => {
|
||||
</div>
|
||||
</Panel>
|
||||
|
||||
<PanelResizeHandle />
|
||||
<Panel style={{ height: '100%' }} defaultSize={25} className={clsx(!aiStore.open && 'hidden')}>
|
||||
<div className='w-full h-full'>
|
||||
<AiMoudle />
|
||||
</div>
|
||||
</Panel>
|
||||
{/* <PanelResizeHandle />
|
||||
<Panel style={{ height: '100%' }} defaultSize={25} className={clsx('bg-gray-100')}>
|
||||
侧边栏
|
||||
</Panel> */}
|
||||
</PanelGroup>
|
||||
</div>
|
||||
<LayoutUser />
|
||||
|
||||
Reference in New Issue
Block a user