Something went wrong. Try again.
An Android app for exploring the marine life, featuring local names, detailed profiles, and easy search. One-stop-shop for researchers, hob…
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445
import axios from 'axios';
export const getSingleItem = async (id) => { try { const res = await axios.get(`${import.meta.env.VITE_APP_API_BASE_URL}/api/v1/items/${id}`); return res.data; } catch (error) { console.log(error); }};
export const getSearchSuggestions = async (category, query) => { try { const res = await axios.get(`${import.meta.env.VITE_APP_API_BASE_URL}/api/v1/search?category=${category}&query=${query}`); return res.data; } catch (error) { console.log(error); }};
export const sendSuggession = async (feedback) => {
try { const res = await axios.post(`${import.meta.env.VITE_APP_API_BASE_URL}/api/v1/suggestions`, feedback); console.log(res) return res.data; } catch (error) { console.log(error); }
};
export const sendContact = async (contact) => {
try { const res = await axios.post(`${import.meta.env.VITE_APP_API_BASE_URL}/api/v1/messages`, contact); console.log(res) return res.data; } catch (error) { console.log(error); }
};