jitsi-meet-electron/app/features/onboarding/components/ServerTimeoutSpotlight.js
2020-06-04 16:14:39 +02:00

68 lines
1.4 KiB
JavaScript

// @flow
import { Spotlight } from '@atlaskit/onboarding';
import React, { Component } from 'react';
import { connect } from 'react-redux';
import type { Dispatch } from 'redux';
import { continueOnboarding } from '../actions';
type Props = {
/**
* Redux dispatch.
*/
dispatch: Dispatch<*>;
};
/**
* Server Setting Spotlight Component.
*/
class ServerTimeoutSpotlight extends Component<Props, *> {
/**
* Initializes a new {@code ServerSettingSpotlight} instance.
*
* @inheritdoc
*/
constructor(props: Props) {
super(props);
this._next = this._next.bind(this);
}
/**
* Render function of component.
*
* @returns {ReactElement}
*/
render() {
return (
<Spotlight
actions = { [
{
onClick: this._next,
text: 'Next'
}
] }
dialogPlacement = 'right top'
target = { 'server-timeout' } >
Timeout to join a meeting, if the meeting hasn't been joined before the timeout hits, it's cancelled.
</Spotlight>
);
}
_next: (*) => void;
/**
* Close the spotlight component.
*
* @returns {void}
*/
_next() {
this.props.dispatch(continueOnboarding());
}
}
export default connect()(ServerTimeoutSpotlight);