move handleExitAudio to service
This commit is contained in:
parent
d2405d4c61
commit
7479570a8c
@ -2,7 +2,6 @@ import React, { Component } from 'react';
|
||||
import { createContainer } from 'meteor/react-meteor-data';
|
||||
import ActionsBar from './component';
|
||||
import Service from './service';
|
||||
import { exitAudio } from '/imports/api/phone';
|
||||
|
||||
class ActionsBarContainer extends Component {
|
||||
constructor(props) {
|
||||
@ -21,7 +20,7 @@ class ActionsBarContainer extends Component {
|
||||
|
||||
export default createContainer(() => {
|
||||
const isPresenter = Service.isUserPresenter();
|
||||
const handleExitAudio = () => exitAudio();
|
||||
const handleExitAudio = () => Service.handleExitAudio();
|
||||
const handleOpenJoinAudio = () => Service.handleJoinAudio();
|
||||
|
||||
return {
|
||||
|
@ -2,6 +2,7 @@ import AuthSingleton from '/imports/ui/services/auth/index.js';
|
||||
import Users from '/imports/api/users';
|
||||
import { joinListenOnly } from '/imports/api/phone';
|
||||
import { showModal } from '/imports/ui/components/app/service';
|
||||
import { exitAudio } from '/imports/api/phone';
|
||||
import Audio from '/imports/ui/components/audio-modal/component';
|
||||
import React, { Component } from 'react';
|
||||
|
||||
@ -13,6 +14,10 @@ let isUserPresenter = () => {
|
||||
}).user.presenter;
|
||||
};
|
||||
|
||||
const handleExitAudio = () => {
|
||||
return exitAudio();
|
||||
}
|
||||
|
||||
const handleJoinAudio = () => {
|
||||
const handleJoinListenOnly = () => joinListenOnly();
|
||||
return showModal(<Audio handleJoinListenOnly={handleJoinListenOnly} />);
|
||||
@ -21,4 +26,5 @@ const handleJoinAudio = () => {
|
||||
export default {
|
||||
isUserPresenter,
|
||||
handleJoinAudio,
|
||||
handleExitAudio,
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user