// import {
//   FindAlarmSnapshot,
// } from '@/service/http/aiserver';
import { Image } from 'antd';
import React, { useState, useEffect } from 'react';

interface ISnapshot {
  filePath: string;
}

const Snapshot: React.FC<ISnapshot> = ({
  filePath,
}) => {
  // const [base64, setBase64] = useState("");
  // useEffect(() => {
  //   if (filePath != "") {
  //     FindAlarmSnapshot(filePath).then(data => {
  //       setBase64(data.data.data)
  //     })
  //   }
  // }, [filePath]);
  return (
    <>
      <Image
        width="100%"
        height="130px"
        fallback={'./assets/img/noImg.png'}
        src={filePath || './assets/img/noImg.png'}
      />
    </>
  );
};

export default Snapshot;
