import React from 'react'; import { Box, Flex, Text, Avatar, Heading, Button } from '@chakra-ui/react'; import { useTranslation } from 'next-i18next'; import type { AppListItemType } from '@fastgpt/global/core/app/type'; import { useRouter } from 'next/router'; type Props = { gateApps: AppListItemType[]; }; const GateAppsList = ({ gateApps }: Props) => { const { t } = useTranslation(); const router = useRouter(); const handleGateClick = (appId: string) => { router.push(`/app/detail?appId=${appId}`); }; return ( {t('account_gate:gate_list')} {gateApps.length === 0 ? ( {t('account_gate:no_gate_available')} ) : ( {gateApps.map((gate) => ( handleGateClick(gate._id)} > {gate.name} {gate.intro && ( {gate.intro} )} ))} )} ); }; export default GateAppsList;