/*
 * Return image url from a Contentful field (object or array of objects)
 */
export const getImageFromField = (data) => {
  const image = Array.isArray(data) ? data[0] : data;
  return image?.file?.url;
};
