Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/common/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -1157,6 +1157,4 @@ export const toCamelCase = str => {
.replace(/^(.)/, (m) => m.toLowerCase());
}

export const isInWaitlist = () => getCurrentUser()?.auth_groups?.includes('mapper-waitlist')

export const hashString = value => (value || '').split('').reduce((sum, char) => sum + char.charCodeAt(0), 0)
7 changes: 1 addition & 6 deletions src/components/app/LeftMenu.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { styled } from '@mui/material/styles';
import { useTranslation } from 'react-i18next'
import { useLocation } from 'react-router-dom';
import Typography from '@mui/material/Typography'
import Chip from '@mui/material/Chip';
import List from '@mui/material/List';
import ListItem from '@mui/material/ListItem';
import ListItemButton from '@mui/material/ListItemButton';
Expand All @@ -14,7 +13,7 @@ import DashboardIcon from '@mui/icons-material/Dashboard';
import FolderOpenIcon from '@mui/icons-material/FolderOutlined';
import CommunityIcon from '@mui/icons-material/GroupsOutlined';
import Divider from '@mui/material/Divider';
import { getCurrentUser, refreshCurrentUserCache, getCurrentUserOrgs, hasMapper, isInWaitlist} from '../../common/utils';
import { getCurrentUser, refreshCurrentUserCache, getCurrentUserOrgs, hasMapper} from '../../common/utils';
import { trayItems, isTrayItemSelected } from '../../common/navigation';
import { getFollowedObjects } from '../../common/following';
import { PRIMARY_COLORS } from '../../common/colors';
Expand Down Expand Up @@ -107,10 +106,6 @@ const LeftMenu = ({ isOpen, onClose }) => {
item.key === 'map-projects' && mapProjectCount !== null &&
<span><b>{mapProjectCount.toLocaleString()}</b></span>
}
{
item.key === 'map-projects' && isInWaitlist() &&
<Chip size='small' variant='contained' label='Waitlist' color='primary' />
}
</ListItemButton>
</ListItem>
)
Expand Down
Loading