Rename interfaces, AppBar changes

This commit is contained in:
cracklesparkle
2024-06-28 12:33:07 +09:00
parent c41e59cd86
commit af1d497715
13 changed files with 165 additions and 80 deletions

View File

@ -3,10 +3,10 @@ import { TextField, Button, Container, Typography, Box } from '@mui/material';
import { AxiosResponse } from 'axios';
import { ApiResponse } from '../../interfaces/auth';
import UserService from '../../services/UserService';
import { CreateUserFormData } from '../../interfaces/user';
import { IUserCreate } from '../../interfaces/user';
const SignUp = () => {
const { register, handleSubmit, formState: { errors } } = useForm<CreateUserFormData>({
const { register, handleSubmit, formState: { errors } } = useForm<IUserCreate>({
defaultValues: {
email: '',
login: '',
@ -19,7 +19,7 @@ const SignUp = () => {
})
const onSubmit: SubmitHandler<CreateUserFormData> = async (data) => {
const onSubmit: SubmitHandler<IUserCreate> = async (data) => {
try {
const response: AxiosResponse<ApiResponse> = await UserService.createUser(data)
console.log('Успешная регистрация:', response.data);