Skip to content

Commit

Permalink
removed comments
Browse files Browse the repository at this point in the history
  • Loading branch information
rahulg1254 committed Jul 15, 2024
1 parent 4eb6bd3 commit 7616c4e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/pages/block.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ const Block: React.FC = () => {
const state = stateData.find((state) => state.state === selectedState);
if (state) {
setSelectedDistrict(state.districts[0]);
// Assuming you want to load data for the first district initially
fetchDataForDistrict(state.districts[0]);
} else {
setSelectedDistrict("All Districts");
Expand All @@ -86,8 +85,7 @@ const Block: React.FC = () => {
const handleDistrictChange = (event: SelectChangeEvent) => {
const selectedDistrict = event.target.value as string;
setSelectedDistrict(selectedDistrict);
setSelectedBlock("All Blocks"); // Reset selected block
// Fetch data based on selected district
setSelectedBlock("All Blocks");
fetchDataForDistrict(selectedDistrict);
};

Expand Down

0 comments on commit 7616c4e

Please sign in to comment.