Skip to content

Commit

Permalink
Fix state and render bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
kamicut committed May 17, 2023
1 parent faf0b3a commit 44d13f7
Showing 1 changed file with 13 additions and 29 deletions.
42 changes: 13 additions & 29 deletions src/pages/organizations/[id]/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ class Organization extends Component {

this.closeProfileModal = this.closeProfileModal.bind(this)
this.renderBadges = this.renderBadges.bind(this)
this.renderMap = this.renderMap.bind(this)
}

async componentDidMount() {
Expand Down Expand Up @@ -306,16 +307,17 @@ class Organization extends Component {
)

return (
<Map
markers={centers}
style={{
height: '360px',
zIndex: '10',
marginBottom: '1rem',
}}
onBoundsChange={this.onMapBoundsChange.bind(this)}
/>
<Checkbox
<>
<Map
markers={centers}
style={{
height: '360px',
zIndex: '10',
marginBottom: '1rem',
}}
onBoundsChange={this.onMapBoundsChange.bind(this)}
/>
<Checkbox
border={'2px'}
marginTop={'-5rem'}
marginLeft={'1rem'}
Expand All @@ -328,7 +330,7 @@ class Organization extends Component {
id='map-bounds-filter'
type='checkbox'
colorScheme={'brand'}
isChecked={searchOnMapMove}
isChecked={this.state.searchOnMapMove}
onChange={(e) => this.setSearchOnMapMove(e)}
>
Filter teams by map
Expand Down Expand Up @@ -418,24 +420,6 @@ class Organization extends Component {
<Box layerStyle={'shadowed'} as='section'>
<Heading variant='sectionHead'>Teams</Heading>
{this.renderMap(teams)}
<Checkbox
border={'2px'}
marginTop={'-4rem'}
marginLeft={'1rem'}
position='absolute'
zIndex='2000'
borderColor='brand.600'
p={2}
bg='white'
name='map-bounds-filter'
id='map-bounds-filter'
type='checkbox'
colorScheme={'brand'}
isChecked={searchOnMapMove}
onChange={(e) => this.setSearchOnMapMove(e)}
>
Filter teams by map
</Checkbox>
<TeamsTable
type='org-teams'
orgId={org.data.id}
Expand Down

0 comments on commit 44d13f7

Please sign in to comment.