export const toBase64 = (value) =>
  new Promise((resolve, reject) => {
    const reader = new FileReader();
    reader.readAsDataURL(value);
    reader.onload = () => resolve(reader.result);
    reader.onerror = reject;
  });
