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