import React, { useEffect } from "react"; import { Form, Button, Container } from "react-bootstrap"; import { GiConfirmed } from "react-icons/gi"; import useCreateRestaurant from "../Hooks/Restaurant/useCreateRestaurant"; import useFormData from "../Hooks/useFormData"; import useGet from "../Hooks/useGet"; const AddRestaurantForm = (props) => { const { createRestaurant } = useCreateRestaurant(); var dummy = { restaurantName: "", restaurantLocation: "", cousineType: "", restaurantDescription: "", restaurantEdbs: "111", } const edit = props.restaurant != null const { formData, onFormChange, onCheckBoxChange, setFormData } = useFormData(edit ? props.restaurant : dummy); console.log(formData) return ( <>
Име на ресторант Локација на ресторант Опис Тип кујна
); }; export default AddRestaurantForm;