import React from 'react'; import { Flex, Box, IconButton } from '@chakra-ui/react'; import { useRouter } from 'next/router'; import { useTranslation } from 'next-i18next'; import MyIcon from '@fastgpt/web/components/common/Icon'; import Avatar from '@/components/Avatar'; import { AppListItemType } from '@fastgpt/global/core/app/type'; const SliderApps = ({ showExist = true, apps, activeAppId }: { showExist?: boolean; apps: AppListItemType[]; activeAppId: string; }) => { const { t } = useTranslation(); const router = useRouter(); return ( {showExist && ( router.push('/app/list')} > } bg={'white'} boxShadow={'1px 1px 9px rgba(0,0,0,0.15)'} size={'smSquare'} borderRadius={'50%'} aria-label={''} /> {t('core.chat.Exit Chat')} )} {apps.map((item) => ( { router.replace({ query: { ...router.query, chatId: '', appId: item._id } }); } })} > {item.name} ))} ); }; export default SliderApps;