API - Method POST on react

0 votes
27 views
added Apr 2 in API by lcjr First Warrant Officer (11,850 points)
import React, { useState, useEffect } from 'react';
import { css, jsx } from '@emotion/react';
import { NextSeo } from 'next-seo';
import ERPCSVUploader from '../components/erp-bulk/ERPCSVUploader';
import Layout from '../components/template/Layout';
import PreFooterComponent from '../components/global/PreFooterComponent';

const ERPBulk = () => {
  const handleCsvUpload = csvData => {
    console.log('CSV Uploaded:', csvData);
  };

  const [isMobile, toggleDevice] = useState();
  //   const [isLoadedGPT, setLoadedGPT] = useState(false);

  useEffect(() => {
    if (window.innerWidth < 992) {
      toggleDevice(true);
    } else {
      toggleDevice(false);
    }
  });

  return (
    <Layout classProp="erp-bulk" isMobile={isMobile}>
      <div className="container prop-container erp-bulk-main">
        <h1>Edge Reference Price - Bulk Valuation</h1>
        <div className="sub-title">
          Please upload your CSV file containing a list of addresses for
          property valuation.
          <br /><br />
          Kindly ensure that the file is in CSV format and is less than 100 MB.
        </div>
        <ERPCSVUploader onUpload={handleCsvUpload} />
        {/* <TestAuthentication /> */}
      </div>
    </Layout>
  );
};

export default ERPBulk;

 

lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...