Skip to content

Commit

Permalink
test1
Browse files Browse the repository at this point in the history
  • Loading branch information
JackTheVac committed Nov 17, 2021
1 parent 38a0a44 commit 899b72b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/components/Classes/components/JoinClassModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
} from 'reactstrap';
import * as fetch from '../../../lib/fetch';

const JoinClassModal = ({ props }) => {
const JoinClassModal = function ({ props }) {
const [wid, setWid] = useState('');
const [_disableSubmit, setDisableSubmit] = useState(false);
const [error, setError] = useState('');
Expand All @@ -24,8 +24,10 @@ const JoinClassModal = ({ props }) => {
// }

const closeModal = () => {
if (props.onClose && {}.toString.call(props.onClose) === '[object Function]') {
props.onClose();
const { onClose } = props;

if (onClose && {}.toString.call(onClose) === '[object Function]') {
onClose();
}

setWid('');
Expand Down

0 comments on commit 899b72b

Please sign in to comment.