mirror of
https://github.com/logto-io/logto.git
synced 2025-01-27 21:39:16 -05:00
refactor(console): resolve rebase errors
This commit is contained in:
parent
8de7e5538d
commit
ae4ca7b7c5
2 changed files with 3 additions and 4 deletions
|
@ -57,9 +57,8 @@ function CreateTenantModal({ isOpen, onClose }: Props) {
|
|||
const onSubmit = handleSubmit(async (data) => {
|
||||
try {
|
||||
const { name, tag } = data;
|
||||
const newTenant = await cloudApi
|
||||
.post('/api/tenants', { json: { name, tag } })
|
||||
.json<TenantInfo>();
|
||||
const newTenant = await cloudApi.post('/api/tenants', { body: { name, tag } });
|
||||
|
||||
onClose(newTenant);
|
||||
} catch (error: unknown) {
|
||||
toast.error(error instanceof Error ? error.message : String(error));
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { TenantTag } from '@logto/schemas/models';
|
||||
import { type TenantInfo, TenantTag } from '@logto/schemas/models';
|
||||
import classNames from 'classnames';
|
||||
import { useEffect, useState } from 'react';
|
||||
import { FormProvider, useForm } from 'react-hook-form';
|
||||
|
|
Loading…
Add table
Reference in a new issue