import React, { useEffect, useState } from 'react' import { Link } from 'react-router-dom' import ClipLoader from 'react-spinners/ClipLoader' import swal from 'sweetalert' import axios from 'axios' import { isAutheticated } from 'src/auth' function ApplicationName() { const [loading, setLoading] = useState(false) const token = isAutheticated() const [appName, setAppName] = useState('') useEffect(() => { async function getConfiguration() { const configDetails = await axios.get(`/api/config`, { headers: { Authorization: `Bearer ${token}`, }, }) configDetails.data.result.map((item) => { setAppName(item?.appName) }) } getConfiguration() }, []) async function handelChange(e) { setAppName(e.target.value) } async function handelSubmit() { setLoading(true) let res = await axios.post(`/api/config/application/name`, { appName }, { headers: { Authorization: `Bearer ${token}`, }, }) if (res) { setLoading(false) console.log(res) swal('Success!', res.data.message, res.data.status) } } return (

Application Name

<> handelChange(e)} className="form-control input-field " id="basicpill-phoneno-input" />
{/* */}
{/* */}
{/* */}
) } export default ApplicationName