Skip to content

Commit

Permalink
Merge pull request #285 from chain4travel/aeddaqqa/hide-onmessenger
Browse files Browse the repository at this point in the history
refactor(partnerShowRoom): hid on messenger filter on camino
  • Loading branch information
aeddaqqa authored Dec 19, 2024
2 parents 4be981b + a0d0173 commit 7955a6a
Showing 1 changed file with 26 additions and 23 deletions.
49 changes: 26 additions & 23 deletions src/components/Partners/PartnersFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const PartnersFilter: React.FC<PartnersFilterProps> = ({ state, dispatchPartners
return ''
}, [data])
const auth = useAppSelector(state => state.appConfig.isAuth)

return (
<Box
sx={{
Expand Down Expand Up @@ -71,30 +71,33 @@ const PartnersFilter: React.FC<PartnersFilterProps> = ({ state, dispatchPartners
}
/>
</Box>
<Box sx={{ display: 'flex', alignItems: 'center', gap: '.5rem' }}>
<FormControlLabel
label={<Typography variant="body2">On Messenger</Typography>}
control={
<Checkbox
sx={{
color: theme => theme.palette.secondary.main,
'&.Mui-checked': {
color: theme => theme.palette.secondary.main,
},
'&.MuiCheckbox-colorSecondary.Mui-checked': {
color: theme => theme.palette.secondary.main,
},
}}
checked={state.onMessenger}
onChange={() =>
dispatchPartnersActions({
type: partnersActions.TOGGLE_ON_MESSENGER,
})
{activeNetwork?.name?.toLowerCase() !== 'camino' &&
activeNetwork?.name?.toLowerCase() !== 'columbus' && (
<Box sx={{ display: 'flex', alignItems: 'center', gap: '.5rem' }}>
<FormControlLabel
label={<Typography variant="body2">On Messenger</Typography>}
control={
<Checkbox
sx={{
color: theme => theme.palette.secondary.main,
'&.Mui-checked': {
color: theme => theme.palette.secondary.main,
},
'&.MuiCheckbox-colorSecondary.Mui-checked': {
color: theme => theme.palette.secondary.main,
},
}}
checked={state.onMessenger}
onChange={() =>
dispatchPartnersActions({
type: partnersActions.TOGGLE_ON_MESSENGER,
})
}
/>
}
/>
}
/>
</Box>
</Box>
)}
</Box>
{(!auth || !partnerCChainAddress) && (
<Box
Expand Down

0 comments on commit 7955a6a

Please sign in to comment.