feat: add chat history and edit
This commit is contained in:
@@ -4,6 +4,8 @@ import { Outlet, useLocation } from 'react-router';
|
||||
import { useContainerStore } from '../store';
|
||||
import { useEffect } from 'react';
|
||||
import { useShallow } from 'zustand/react/shallow';
|
||||
import { AiMoudle } from '@/pages/ai-chat';
|
||||
import { LayoutMain } from '@/modules/layout';
|
||||
|
||||
export const Main = () => {
|
||||
const containerStore = useContainerStore(
|
||||
@@ -17,30 +19,20 @@ export const Main = () => {
|
||||
const location = useLocation();
|
||||
const isEdit = location.pathname.includes('edit/list');
|
||||
return (
|
||||
<div className='flex w-full h-full flex-col'>
|
||||
<div className='layout-menu'>
|
||||
Container
|
||||
<Button
|
||||
className={!isEdit ? 'hidden' : ''}
|
||||
icon={<PlusOutlined />}
|
||||
onClick={() => {
|
||||
console.log('add');
|
||||
containerStore.setFormData({});
|
||||
containerStore.setShowEdit(true);
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className='flex'
|
||||
style={{
|
||||
height: 'calc(100vh - 3rem)',
|
||||
}}>
|
||||
<div className='flex-grow overflow-hidden'>
|
||||
<div className='w-full h-full rounded-lg'>
|
||||
<Outlet />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<LayoutMain
|
||||
title={
|
||||
<>
|
||||
Container
|
||||
<Button
|
||||
className={!isEdit ? 'hidden' : ''}
|
||||
icon={<PlusOutlined />}
|
||||
onClick={() => {
|
||||
console.log('add');
|
||||
containerStore.setFormData({});
|
||||
containerStore.setShowEdit(true);
|
||||
}}
|
||||
/>
|
||||
</>
|
||||
}></LayoutMain>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user