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.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
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 getInitialSuggestions = async (category, query) => { try { const res = await axios.get(`${import.meta.env.VITE_APP_API_BASE_URL}/api/v1/search?category=${category}`); 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 getGSearchSuggestions = async ( query) => { try { const res = await axios.get(`${import.meta.env.VITE_APP_API_BASE_URL}/api/v1/search?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); }
};