mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-03-31 03:28:49 +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 withFocusable = (Component) => {
|
||||
return function withFocusable(props) {
|
||||
return (
|
||||
<FocusableContext.Consumer>
|
||||
{focusable => <Component {...props} focusable={focusable} />}
|
||||
</FocusableContext.Consumer>
|
||||
);
|
||||
};
|
||||
return (props) => (
|
||||
<FocusableContext.Consumer>
|
||||
{focusable => <Component {...props} focusable={focusable} />}
|
||||
</FocusableContext.Consumer>
|
||||
);
|
||||
};
|
||||
|
||||
module.exports = withFocusable;
|
||||
|
|
|
|||
Loading…
Reference in a new issue