feat: add github login
This commit is contained in:
@@ -1,14 +1,33 @@
|
||||
import { AiMoudle } from '@/pages/ai-chat';
|
||||
import { MenuOutlined } from '@ant-design/icons';
|
||||
import { Button } from 'antd';
|
||||
import { Outlet } from 'react-router-dom';
|
||||
import { LayoutMenu } from './Menu';
|
||||
import { useMenuStore } from './store';
|
||||
import { useShallow } from 'zustand/react/shallow';
|
||||
|
||||
type LayoutMainProps = {
|
||||
title?: React.ReactNode;
|
||||
children?: React.ReactNode;
|
||||
};
|
||||
export const LayoutMain = (props: LayoutMainProps) => {
|
||||
const menuStore = useMenuStore(
|
||||
useShallow((state) => {
|
||||
return { open: state.open, setOpen: state.setOpen };
|
||||
}),
|
||||
);
|
||||
return (
|
||||
<div className='flex w-full h-full flex-col'>
|
||||
<div className='layout-menu'>{props.title}</div>
|
||||
<div className='flex w-full h-full flex-col relative'>
|
||||
<LayoutMenu />
|
||||
<div className='layout-menu items-center'>
|
||||
<Button
|
||||
className='mr-4'
|
||||
onClick={() => {
|
||||
menuStore.setOpen(true);
|
||||
}}
|
||||
icon={<MenuOutlined />}></Button>
|
||||
<div className='flex flex-grow justify-between'>{props.title}</div>
|
||||
</div>
|
||||
<div
|
||||
className='flex'
|
||||
style={{
|
||||
|
||||
Reference in New Issue
Block a user