Skip to content

Commit

Permalink
[feat] clear bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Neha committed Dec 4, 2024
1 parent 9873994 commit 1e93919
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
1 change: 0 additions & 1 deletion components/Filter/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import StatusDropdown from '@/components/StatusDropdown';
import TechnologyDropdown from '@/components/TechnologyDropdown';
import { FilterHeadingUnused } from '@/styles/texts';
Expand Down
2 changes: 1 addition & 1 deletion components/FilterBar/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState } from 'react';
import { useState } from 'react';
import Filter from '@/components/Filter';
import { FilterChangeHandlers, Filters, FilterType } from '@/types/schema';
import { FilterContainerStyles } from './styles';
Expand Down
11 changes: 9 additions & 2 deletions components/MapViewScreen/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useEffect, useState } from 'react';
import { useEffect, useState } from 'react';
import { useMap } from '@vis.gl/react-google-maps';
import {
LocationIcon,
Expand Down Expand Up @@ -101,7 +101,14 @@ export default function MapViewScreen({

if (filteredProjectsFromDropdowns.length > 0) {
projectsToSearch = filteredProjectsFromDropdowns;
} else {
} else if (
Object.values(selectedFilters).every(filter =>
Array.isArray(filter)
? filter.length === 0
: filter.min === 0 && filter.max === 0,
)
) {
// Only fallback to all projects if no filters are applied
projectsToSearch = projects;
}

Expand Down
1 change: 0 additions & 1 deletion components/StatusDropdown/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react'; //REMOVE
import { FilterType } from '@/types/schema';
import { ExitIcon } from '../../assets/Dropdown-Icons/icons';
import COLORS from '../../styles/colors';
Expand Down
1 change: 0 additions & 1 deletion components/TechnologyDropdown/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import {
ApplyFiltersText,
FilterCategoryLabel,
Expand Down

0 comments on commit 1e93919

Please sign in to comment.