let BackEnd_url = `http://${process.env.REACT_APP_SERVER_MARKETPLACE_URL}`;
export const fetchAssets = async () => {
  try {
    const response = await fetch(`${BackEnd_url}/api/v1/getAllAssets`);
    if (!response.ok) {
      throw new Error("Network response was not ok");
    }
    const result = await response.json();
    // const last10Assets = result.slice(-10);
    // console.log('last10Assets: ', last10Assets);
    return result;
  } catch (error) {
    console.log("error: ", error);
    // throw new Error(error.message);
  }
};
