0
Fork 0
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:
Gao Sun 2023-06-13 17:47:26 +08:00
parent 8de7e5538d
commit ae4ca7b7c5
No known key found for this signature in database
GPG key ID: 13EBE123E4773688
2 changed files with 3 additions and 4 deletions

View file

@ -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));

View file

@ -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';