forked from Ivasoft/mattermost-mobile
20 lines
619 B
JavaScript
20 lines
619 B
JavaScript
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
import React from 'react';
|
|
import IntlWrapper from 'app/components/root';
|
|
|
|
export function wrapWithContextProvider(Comp, excludeEvents = true) {
|
|
return (props) => { //eslint-disable-line react/display-name
|
|
const {navigator} = props; //eslint-disable-line react/prop-types
|
|
return (
|
|
<IntlWrapper
|
|
navigator={navigator}
|
|
excludeEvents={excludeEvents}
|
|
>
|
|
<Comp {...props}/>
|
|
</IntlWrapper>
|
|
);
|
|
};
|
|
}
|