Skip to content

Commit 8fdf097

Browse files
committed
Remove game over button
1 parent df947eb commit 8fdf097

File tree

1 file changed

+8
-7
lines changed
  • services/app/apps/codebattle/assets/js/widgets/pages/tournament

1 file changed

+8
-7
lines changed

services/app/apps/codebattle/assets/js/widgets/pages/tournament/MatchAction.jsx

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,18 @@ import React, { memo, useContext } from 'react';
22

33
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
44
import cn from 'classnames';
5-
import { useSelector } from 'react-redux';
5+
// import { useSelector } from 'react-redux';
66

77
import i18next from '../../../i18n';
88
import CustomEventStylesContext from '../../components/CustomEventStylesContext';
99
import MatchStatesCodes from '../../config/matchStates';
10-
import { sendMatchGameOver } from '../../middlewares/TournamentAdmin';
10+
// import { sendMatchGameOver } from '../../middlewares/TournamentAdmin';
1111

1212
function MatchAction({ match, canModerate, currentUserIsPlayer }) {
13+
console.log(canModerate);
1314
const href = `/games/${match.gameId}`;
1415
const hasCustomEventStyles = useContext(CustomEventStylesContext);
15-
const streamMode = useSelector(state => state.gameUI.streamMode);
16+
// const streamMode = useSelector(state => state.gameUI.streamMode);
1617

1718
const showBtnClassName = cn('btn btn-sm text-nowrap rounded-lg px-3', {
1819
'btn-primary': !hasCustomEventStyles,
@@ -22,10 +23,10 @@ function MatchAction({ match, canModerate, currentUserIsPlayer }) {
2223
'btn-success text-white': !hasCustomEventStyles,
2324
'cb-custom-event-btn-primary': hasCustomEventStyles,
2425
});
25-
const gameOverBtnClassName = cn('btn btn-sm text-nowrap rounded-lg px-3', {
26-
'btn-outline-danger': !hasCustomEventStyles,
27-
'cb-custom-event-btn-outline-danger': hasCustomEventStyles,
28-
});
26+
// const gameOverBtnClassName = cn('btn btn-sm text-nowrap rounded-lg px-3', {
27+
// 'btn-outline-danger': !hasCustomEventStyles,
28+
// 'cb-custom-event-btn-outline-danger': hasCustomEventStyles,
29+
// });
2930

3031
switch (match.state) {
3132
case MatchStatesCodes.pending:

0 commit comments

Comments
 (0)