Skip to content

Commit

Permalink
Merge pull request #376 from AkshataKatwal16/relese-changes
Browse files Browse the repository at this point in the history
Issue feat:Fix Bydefault district selection logic
  • Loading branch information
itsvick authored Dec 2, 2024
2 parents a92cf6a + b41c4c9 commit b4ac0d4
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/pages/block.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,17 @@ const Block: React.FC = () => {
}, [isFirstVisit, searchKeyword, pageLimit, pageOffset, stateCode]);




useEffect(() => {
if(selectedDistrict==="" && districtData?.length!==0){
setSelectedDistrict(districtData[0]?.value);

}
}, [districtData]);



useEffect(() => {
if (districtData[0]?.value && isFirstVisit) {
setSelectedDistrict(districtData[0]?.value);
Expand Down

0 comments on commit b4ac0d4

Please sign in to comment.