import React from 'react'; import { Flex, Box, IconButton } from '@chakra-ui/react'; import { useRouter } from 'next/router'; import { useQuery } from '@tanstack/react-query'; import { useTranslation } from 'react-i18next'; import MyIcon from '@/components/Icon'; import Avatar from '@/components/Avatar'; import { useAppStore } from '@/web/core/app/store/useAppStore'; const SliderApps = ({ appId }: { appId: string }) => { const { t } = useTranslation(); const router = useRouter(); const { myApps, loadMyApps } = useAppStore(); useQuery(['loadModels'], () => loadMyApps(false)); return ( router.push('/app/list')} > } bg={'white'} boxShadow={'1px 1px 9px rgba(0,0,0,0.15)'} h={'28px'} size={'sm'} borderRadius={'50%'} aria-label={''} /> {t('chat.Exit Chat')} {myApps.map((item) => ( { router.replace({ query: { appId: item._id } }); } })} > {item.name} ))} ); }; export default SliderApps;