'use server'

import http from '../app/components/http'

export async function useSearch( query, price, city, category) {
   // let url = propertyUrlEndpoint;
  try{const response = await fetch("api/search", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    body: JSON.stringify({ query }),
  });;

  return response}
  catch(error){
    return (error)
  }
}

