diff --git a/packages/web/src/App.tsx b/packages/web/src/App.tsx index 53fbbf1f..efe20b29 100644 --- a/packages/web/src/App.tsx +++ b/packages/web/src/App.tsx @@ -11,6 +11,7 @@ import { PiEnvelope, PiChatsCircle, PiPenNib, + PiMagnifyingGlass, } from 'react-icons/pi'; import { Outlet } from 'react-router-dom'; import Drawer, { ItemProps } from './components/Drawer'; @@ -29,38 +30,51 @@ const items: ItemProps[] = [ label: 'ホーム', to: '/', icon: , + usecase: true, }, { label: 'チャット', to: '/chat', icon: , + usecase: true, }, ragEnabled ? { label: 'RAG チャット', to: '/rag', icon: , + usecase: true, } : null, { label: '要約', to: '/summarize', icon: , + usecase: true, }, { label: '校正', to: '/editorial', icon: , + usecase: true, }, { label: 'メール生成', to: '/mail', icon: , + usecase: true, }, { label: 'CS 業務効率化', to: '/cs', icon: , + usecase: true, + }, + { + label: 'Kendra 検索', + to: '/kendra', + icon: , + usecase: false, }, ].flatMap((i) => (i !== null ? [i] : [])); diff --git a/packages/web/src/components/Drawer.tsx b/packages/web/src/components/Drawer.tsx index 0a77ec39..35956a14 100644 --- a/packages/web/src/components/Drawer.tsx +++ b/packages/web/src/components/Drawer.tsx @@ -1,4 +1,4 @@ -import React, { useCallback } from 'react'; +import React, { useCallback, useMemo } from 'react'; import { BaseProps } from '../@types/common'; import { Link, useLocation } from 'react-router-dom'; import useDrawer from '../hooks/useDrawer'; @@ -11,6 +11,7 @@ export type ItemProps = BaseProps & { label: string; to: string; icon: JSX.Element; + usecase: boolean; }; const Item: React.FC = (props) => { @@ -30,7 +31,7 @@ const Item: React.FC = (props) => { }, []); return ( = (props) => { return ( @@ -84,18 +85,50 @@ type Props = BaseProps & { const Drawer: React.FC = (props) => { const { opened, switchOpen } = useDrawer(); + const usecases = useMemo(() => { + return props.items.filter((i) => i.usecase); + }, [props.items]); + + const tools = useMemo(() => { + return props.items.filter((i) => !i.usecase); + }, [props.items]); + return ( <>