perf: openapi. error catch

This commit is contained in:
archer
2023-04-10 13:16:24 +08:00
parent a7988c164e
commit 9b1c0e1a3c
8 changed files with 74 additions and 20 deletions

View File

@@ -1,4 +1,5 @@
import React, { useState } from 'react';
import Link from 'next/link';
import {
Card,
Box,
@@ -54,10 +55,21 @@ const OpenApi = () => {
<>
<Card px={6} py={4} position={'relative'}>
<Box fontSize={'xl'} fontWeight={'bold'}>
Open Api Key
Open Api
</Box>
<Box fontSize={'sm'} mt={2}>
key
Open Api Fast Gpt api Api
Key
</Box>
<Box
my={1}
as="a"
href="https://kjqvjse66l.feishu.cn/docx/DmLedTWtUoNGX8xui9ocdUEjnNh"
color={'blue.800'}
textDecoration={'underline'}
target={'_blank'}
>
</Box>
<TableContainer mt={2} position={'relative'}>
<Table>
@@ -93,16 +105,17 @@ const OpenApi = () => {
))}
</Tbody>
</Table>
<Button
mt={5}
isLoading={isCreating}
isDisabled={apiKeys.length >= 5}
title={apiKeys.length >= 5 ? '最多五组 Api Key' : ''}
onClick={() => onclickCreateApiKey()}
>
Api Key
</Button>
</TableContainer>
<Button
maxW={'200px'}
mt={5}
isLoading={isCreating}
isDisabled={apiKeys.length >= 5}
title={apiKeys.length >= 5 ? '最多五组 Api Key' : ''}
onClick={() => onclickCreateApiKey()}
>
Api Key
</Button>
<Loading loading={isGetting || isDeleting} fixed={false} />
</Card>
<Modal isOpen={!!apiKey} onClose={() => setApiKey('')}>