register + deletions + image request changes
This commit is contained in:
@@ -1,20 +1,16 @@
|
||||
import React from "react";
|
||||
import { Form, Input, Button } from "antd";
|
||||
|
||||
import axios from "axios";
|
||||
|
||||
export const FormCreateRoom = () => {
|
||||
const [form] = Form.useForm();
|
||||
|
||||
const onFinish = async (values) => {
|
||||
try {
|
||||
const response = await axios.post(
|
||||
`${import.meta.env.VITE_API_URL}/room`,
|
||||
values,
|
||||
);
|
||||
console.log(response.data);
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
let response = await createRoom(values);
|
||||
if (response?.status >= 200 && response?.status < 300) {
|
||||
window.location.reload();
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
|
Reference in New Issue
Block a user