forked from phoenix/litellm-mirror
(ui) stable UI version
This commit is contained in:
parent
d7375a58f4
commit
5063a7ab5e
1 changed files with 4 additions and 0 deletions
|
@ -36,6 +36,7 @@ const CreateKey: React.FC<CreateKeyProps> = ({
|
|||
const handleCancel = () => {
|
||||
setIsModalVisible(false);
|
||||
setApiKey(null);
|
||||
form.resetFields();
|
||||
};
|
||||
|
||||
const handleCreate = async (formValues) => {
|
||||
|
@ -54,6 +55,7 @@ const CreateKey: React.FC<CreateKeyProps> = ({
|
|||
setData([...data, response]);
|
||||
setApiKey(response["key"]);
|
||||
message.success("API Key Created");
|
||||
form.resetFields();
|
||||
} catch (error) {
|
||||
console.error("Error creating the key:", error);
|
||||
}
|
||||
|
@ -70,6 +72,8 @@ const CreateKey: React.FC<CreateKeyProps> = ({
|
|||
visible={isModalVisible}
|
||||
width={800}
|
||||
footer={null}
|
||||
onOk={handleOk}
|
||||
onCancel={handleCancel}
|
||||
>
|
||||
<Form form={form} onFinish={handleCreate} labelCol={{ span: 6 }} wrapperCol={{ span: 16 }} labelAlign="left">
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue