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: 1 addition & 1 deletion app/graphql/graphql_operations_generated.json

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion app/javascript/EventsApp/MySignupQueue/NextRoundInfoBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,18 @@ import { Link } from 'react-router';
import humanize from '../../humanize';
import classNames from 'classnames';
import { MySignupQueueQueryData } from './queries.generated';
import { TicketMode } from '../../graphqlTypes.generated';

function NextRoundInfoBox({ data }: { data: MySignupQueueQueryData }) {
const { t } = useTranslation();
const { ticketName, timezoneName } = useContext(AppRootContext);

const ticketStatus = useMemo(() => {
// If the convention doesn't use tickets, no warning needed
if (data.convention.ticket_mode === TicketMode.Disabled) {
return 'ok' as const;
}

if (data.convention.my_profile?.ticket) {
if (data.convention.my_profile.ticket.ticket_type.allows_event_signups) {
return 'ok' as const;
Expand All @@ -23,7 +29,7 @@ function NextRoundInfoBox({ data }: { data: MySignupQueueQueryData }) {
} else {
return 'noTicket';
}
}, [data.convention.my_profile?.ticket]);
}, [data.convention.my_profile?.ticket, data.convention.ticket_mode]);

const nextRound = useMemo(() => {
const parsedRounds = parseSignupRounds(data.convention.signup_rounds);
Expand Down
Loading
Loading