import React from 'react'; import Spin from 'antd/lib/spin'; import List from 'antd/lib/list'; import Button from 'antd/lib/button'; import Typography from 'antd/lib/typography'; import { CodeInfoList } from 'test-crawler-core'; import { getCodes } from '../server/service'; import { CodeInfo } from './CodeInfo'; import { ErrorHandler } from '../common/ErrorHandler'; import { Link } from 'react-router-dom'; import { getCodeRoute } from '../routes'; import { useAsync } from '../hook/useAsync'; import { StorageType } from '../server/storage.typing'; const { Title, Text } = Typography; interface Props { storageType: StorageType; projectId: string; } export const ForEachPage = ({ projectId, storageType }: Props) => { const { error, result } = useAsync(() => getCodes(storageType, projectId)); if (error) { return ; } return ( <> For each page { result ? ( Edit , ]} > {name} {pattern} } /> )} /> : }
); }