meal_planner/src/containers/Meal/service.ts
Ruidy 0e3b0a7cee
refactoring (#5)
* use tsx

* compile

* refactor Router

* refactor layout

* refactor home container

* refactor meal container

* refactor categories container

* refactor category container

* refactor search and profile container

* refactor
2021-03-28 17:05:46 +02:00

9 lines
204 B
TypeScript

import { getData } from "../../services/api";
export const getMeal = (id, setMeal) => {
getData(id, setMeal, "lookup");
};
export const getRandomMeal = (setMeal) => {
getData("random", setMeal);
};