source: frontend/src/Components/Hooks/Restaurant/useCreateTableAvailability.js@ 07f4e8b

Last change on this file since 07f4e8b was e6c2521, checked in by darsov2 <62809499+darsov2@…>, 6 months ago

images upload/download impl, other fixes

  • Property mode set to 100644
File size: 747 bytes
Line 
1import React from "react";
2
3import axios from "../../../axios.js";
4import { useNavigate } from "react-router-dom";
5
6const useCreateTableAvailability = () => {
7
8 const createTableAvailability = async (restaurantTableAvailible, id) => {
9 console.log({restaurantTableAvailible})
10 console.log(restaurantTableAvailible)
11 await axios
12 .post(`/restaurant/table/${id}/available/add`, restaurantTableAvailible, {
13 })
14 .then((res) => {
15 //history.push('/hotel');
16 })
17 .catch((err) => {
18 console.log(err);
19 })
20 .finally(() => {
21 });
22 }
23
24 return {
25 createTableAvailability
26 };
27
28}
29
30export default useCreateTableAvailability;
Note: See TracBrowser for help on using the repository browser.