Skip to content

Commit

Permalink
user_role hot fix
Browse files Browse the repository at this point in the history
  • Loading branch information
michellelin1 committed Apr 16, 2024
1 parent 8cd020e commit 28e6654
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/components/Events/EventInfo.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ const EventInfo = ({ dayId, eventDate, day, startTime, endTime, location, notes,
<Text whiteSpace="pre-wrap" mb="2rem">{notes ? notes : 'No notes.'}</Text>

<HStack mt="auto">
<IconButton bg="white" onClick={onOpenPlanner} visibility={currentUser.type == USER_ROLE ? 'hidden' : 'visible'}>
<IconButton bg="white" onClick={onOpenPlanner} visibility={currentUser.type === USER_ROLE ? 'hidden' : 'visible'}>
<LuPen color='#A0AEC0'/>
</IconButton>
<IconButton bg="white" onClick={onOpenDelete} visibility={currentUser.type == USER_ROLE ? 'hidden' : 'visible'}>
<IconButton bg="white" onClick={onOpenDelete} visibility={currentUser.type === USER_ROLE ? 'hidden' : 'visible'}>
<DeleteIcon color='#A0AEC0'/>
</IconButton>
</HStack>
Expand Down
5 changes: 2 additions & 3 deletions src/pages/PublishedSchedule/PublishedSchedule.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@ import { NPOBackend } from '../../utils/auth_utils.js';
import PublishedScheduleTable from '../../components/Events/PublishedScheduleTable.jsx';
import AUTH_ROLES from '../../utils/auth_config.js';
import { useAuthContext } from '../../common/AuthContext.jsx';

import { useEffect, useState } from 'react';
const { ADMIN_ROLE } = AUTH_ROLES.AUTH_ROLES;
import { Box, Select, Text } from '@chakra-ui/react';
const { ADMIN_ROLE, USER_ROLE } = AUTH_ROLES.AUTH_ROLES;

const PublishedSchedule = () => {
// get data from database
Expand Down Expand Up @@ -76,7 +75,7 @@ const PublishedSchedule = () => {
textColor="transparent"
onChange={(e) => setSelectedSeason(e.target.value)}
width="23%"
visibility={currentUser.type == USER_ROLE ? 'hidden' : 'visible'}
visibility={currentUser.type === USER_ROLE ? 'hidden' : 'visible'}
>
{ currentUser.type === ADMIN_ROLE &&
allSeasons.map(item => (
Expand Down

0 comments on commit 28e6654

Please sign in to comment.