more fixes
This commit is contained in:
parent
6a1d5149da
commit
eef5abc444
@ -1,6 +1,5 @@
|
||||
import React from "react";
|
||||
import ProjectList from "./ProjectsList";
|
||||
import { useGetProjectDataRQ } from "../../APIs/getProjectRQ";
|
||||
import { getProjectList } from "../../APIs/ProjectScreenAPIs/getProject";
|
||||
import { useState } from "react";
|
||||
import { useEffect } from "react";
|
||||
@ -14,8 +13,6 @@ export default function Projects(){
|
||||
const [selectedContractFilter, setSelectedContractFilter] = useState<any>('All');
|
||||
const [ContractFilterResponseData, setContractFilterResponseData] = useState<any>();
|
||||
const [searchByFilter, setSearchByFilter] = useState('');
|
||||
const [searchByFilterOnBlur, setSearchByFilterOnBlur] = useState('');
|
||||
const { data: getProjectDataList, isLoading, isError } = useGetProjectDataRQ(searchByFilter);
|
||||
|
||||
useEffect(() => {
|
||||
const fetchData = async () => {
|
||||
@ -37,17 +34,10 @@ export default function Projects(){
|
||||
console.error('Error fetching data:', error);
|
||||
}
|
||||
};
|
||||
|
||||
fetchData();
|
||||
}, [selectedContractFilter, searchByFilter]);
|
||||
|
||||
|
||||
if (isLoading) {
|
||||
return <div>Loading...</div>;
|
||||
}
|
||||
|
||||
// const { foo, bar } = await ContractFilterResponseData.then((result:any) => result.data);
|
||||
|
||||
|
||||
console.log(ContractFilterResponseData,"hsdfgjdgf")
|
||||
|
||||
return(
|
||||
@ -82,14 +72,11 @@ export default function Projects(){
|
||||
id="standard-name"
|
||||
variant="standard"
|
||||
label="Search By"
|
||||
value={searchByFilterOnBlur}
|
||||
value={searchByFilter}
|
||||
onChange={(e)=>{
|
||||
setSearchByFilterOnBlur(e.target.value);
|
||||
}}
|
||||
onBlur={(e)=>{
|
||||
setSearchByFilter(searchByFilter);
|
||||
// setSearchByFilterOnBlur(searchByFilter);
|
||||
setSearchByFilter(e.target.value);
|
||||
}}
|
||||
|
||||
sx={{input: { color: 'white' },
|
||||
"& label": {
|
||||
color: "white"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user