d9de58e1c8
The component expects a boolean but isIphone property return an array ["Iphone"] if the user is from an iPhone
14 lines
499 B
JavaScript
14 lines
499 B
JavaScript
import React from 'react';
|
|
import FullscreenButtonComponent from './component';
|
|
import FullscreenService from './service';
|
|
|
|
const FullscreenButtonContainer = props => <FullscreenButtonComponent {...props} />;
|
|
|
|
export default (props) => {
|
|
const handleToggleFullScreen = ref => FullscreenService.toggleFullScreen(ref);
|
|
const isIphone = (navigator.userAgent.match(/iPhone/i)) ? true : false;
|
|
return (
|
|
<FullscreenButtonContainer {...props} {...{ handleToggleFullScreen, isIphone }} />
|
|
);
|
|
};
|