11import React , { useState } from 'react' ;
2- import {
3- Autocomplete ,
4- Box ,
5- Button ,
6- Checkbox ,
7- FormControlLabel ,
8- Switch ,
9- TextField ,
10- Typography ,
11- useTheme
12- } from '@mui/material' ;
2+ import { Autocomplete , Box , Button , Checkbox , TextField , Typography } from '@mui/material' ;
133import NERModal from '../../components/NERModal' ;
144import PeopleIcon from '@mui/icons-material/People' ;
155import { useAllUsers , useCurrentUser } from '../../hooks/users.hooks' ;
@@ -32,7 +22,6 @@ export interface BaseFilterModalProps {
3222 setTeamIds : ( ids : string [ ] ) => void ;
3323 setShowInvited : ( changed : boolean ) => void ;
3424 setShowTeam : ( changed : boolean ) => void ;
35- setAllEventsMode : ( enabled : boolean ) => void ;
3625}
3726
3827const FilterModal : React . FC < BaseFilterModalProps > = ( {
@@ -42,14 +31,11 @@ const FilterModal: React.FC<BaseFilterModalProps> = ({
4231 setMemberIds,
4332 setTeamIds,
4433 setShowInvited,
45- setShowTeam,
46- setAllEventsMode
34+ setShowTeam
4735} ) => {
4836 const [ dropDownMembersOpen , setDropDownMembersOpen ] = useState ( false ) ;
4937 const [ dropDownTeamOpen , setDropDownTeamOpen ] = useState ( false ) ;
5038 const currUser = useCurrentUser ( ) ;
51- const theme = useTheme ( ) ;
52- const allEventsMode = filterValues ?. allEventsMode ?? false ;
5339
5440 const MemberDropdown = ( ) => {
5541 const memberIds = filterValues ?. memberIds ?? [ ] ;
@@ -284,26 +270,7 @@ const FilterModal: React.FC<BaseFilterModalProps> = ({
284270 formId = "shop-form"
285271 showCloseButton
286272 >
287- < Box sx = { { display : 'flex' , alignItems : 'center' , gap : 1 , mb : 2 } } >
288- < FormControlLabel
289- control = {
290- < Switch
291- checked = { allEventsMode }
292- onChange = { ( e ) => setAllEventsMode ( e . target . checked ) }
293- sx = { {
294- '& .MuiSwitch-switchBase.Mui-checked' : {
295- color : theme . palette . primary . main
296- } ,
297- '& .MuiSwitch-switchBase.Mui-checked + .MuiSwitch-track' : {
298- backgroundColor : theme . palette . primary . main
299- }
300- } }
301- />
302- }
303- label = { < Typography sx = { { fontSize : 16 , color : 'white' } } > Show All Events</ Typography > }
304- />
305- </ Box >
306- < Box sx = { { opacity : allEventsMode ? 0.5 : 1 , pointerEvents : allEventsMode ? 'none' : 'auto' } } >
273+ < Box >
307274 < Box sx = { { display : 'flex' , alignItems : 'center' , gap : 1 } } >
308275 < PeopleIcon sx = { { color : 'white' , mr : 1 } } />
309276 < Typography variant = "h6" > Attendees</ Typography >
0 commit comments