mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-04-21 03:22:11 +00:00
withFocusable uses arrow function
This commit is contained in:
parent
e76eb8a09f
commit
e05642df3c
1 changed files with 5 additions and 7 deletions
|
|
@ -2,13 +2,11 @@ const React = require('react');
|
||||||
const FocusableContext = require('./FocusableContext');
|
const FocusableContext = require('./FocusableContext');
|
||||||
|
|
||||||
const withFocusable = (Component) => {
|
const withFocusable = (Component) => {
|
||||||
return function withFocusable(props) {
|
return (props) => (
|
||||||
return (
|
<FocusableContext.Consumer>
|
||||||
<FocusableContext.Consumer>
|
{focusable => <Component {...props} focusable={focusable} />}
|
||||||
{focusable => <Component {...props} focusable={focusable} />}
|
</FocusableContext.Consumer>
|
||||||
</FocusableContext.Consumer>
|
);
|
||||||
);
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = withFocusable;
|
module.exports = withFocusable;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue