mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-04-21 03:22:11 +00:00
ServerWarning buttons actions wip
This commit is contained in:
parent
5ee9413ffc
commit
d071c3e8e7
1 changed files with 22 additions and 2 deletions
|
|
@ -1,19 +1,39 @@
|
||||||
// Copyright (C) 2017-2020 Smart code 203358507
|
// Copyright (C) 2017-2020 Smart code 203358507
|
||||||
|
|
||||||
const React = require('react');
|
const React = require('react');
|
||||||
|
// const { useServices } = require('stremio/services');
|
||||||
const PropTypes = require('prop-types');
|
const PropTypes = require('prop-types');
|
||||||
const classnames = require('classnames');
|
const classnames = require('classnames');
|
||||||
const Button = require('stremio/common/Button');
|
const Button = require('stremio/common/Button');
|
||||||
const styles = require('./styles');
|
const styles = require('./styles');
|
||||||
|
|
||||||
const ServerWarning = ({ className }) => {
|
const ServerWarning = ({ className }) => {
|
||||||
|
// const { core } = useServices();
|
||||||
|
const RewindServerWarning = React.useCallback(() => {
|
||||||
|
console.log('later');
|
||||||
|
// core.transport.dispatch({
|
||||||
|
// action: 'Ctx',
|
||||||
|
// args: {
|
||||||
|
// action: 'RewindServerWarning',
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
}, []);
|
||||||
|
const DismissServerWarning = React.useCallback(() => {
|
||||||
|
console.log('dismiss');
|
||||||
|
// core.transport.dispatch({
|
||||||
|
// action: 'Ctx',
|
||||||
|
// args: {
|
||||||
|
// action: 'DismissServerWarning',
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
}, []);
|
||||||
return (
|
return (
|
||||||
<div className={classnames(className, styles['warning-container'])}>
|
<div className={classnames(className, styles['warning-container'])}>
|
||||||
<div className={styles['warning-statement']}>Streaming server must be available.</div>
|
<div className={styles['warning-statement']}>Streaming server must be available.</div>
|
||||||
<Button className={styles['warning-button']} title={'later'}>
|
<Button className={styles['warning-button']} title={'later'} onClick={RewindServerWarning}>
|
||||||
<span className={styles['warning-label']}>Later</span>
|
<span className={styles['warning-label']}>Later</span>
|
||||||
</Button>
|
</Button>
|
||||||
<Button className={styles['warning-button']} title={'dismiss'}>
|
<Button className={styles['warning-button']} title={'dismiss'} onClick={DismissServerWarning}>
|
||||||
<span className={styles['warning-label']}>Dismiss</span>
|
<span className={styles['warning-label']}>Dismiss</span>
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue