Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
themeListener.unsubscribe(this.context, this.unsubscribeId);
}
}
render() {
return React.createElement(Component, _extends({ theme: this.state.theme }, this.props));
}
}
WithTheme.contextTypes = themeListener.contextTypes;
if (process.env.NODE_ENV !== 'production') {
WithTheme.displayName = wrapDisplayName(Component, 'WithTheme');
}
hoistNonReactStatics(WithTheme, Component);
if (process.env.NODE_ENV !== 'production') {
// Exposed for test purposes.
WithTheme.Naked = Component;
}
return WithTheme;
};
export default function withSafeAreaView(WrappedComponent: Node): () => Node {
function EnhancedComponent(props: any) {
return (
{/* $FlowFixMe */}
);
}
return hoistNonReactStatics(EnhancedComponent, WrappedComponent);
}
)}
)
}
return
}}
))
JssContextSubscriber.displayName = `JssContextSubscriber(${displayName})`
// $FlowFixMe - React's types should allow custom static properties on component.
JssContextSubscriber.InnerComponent = InnerComponent
return hoistNonReactStatics(JssContextSubscriber, InnerComponent)
}
}
return function(Wrapped)
{
class On_enter extends Component
{
render()
{
return
}
}
On_enter.displayName = `onEnter(${get_display_name(Wrapped)})`
hoist_statics(On_enter, Wrapped)
const preloader = On_enter[Preload_method_name]
On_enter[Preload_method_name] = function on_enter_then_preload(parameters)
{
let redirect_to
const redirect = to => redirect_to = to
const proceed = () => preloader ? preloader(parameters) : Promise.resolve()
const on_enter_result = on_enter(parameters, redirect)
// If it's not a Promise, then just proceed
if (!on_enter_result.then)
{
return proceed()
const withContext = contextTypes => Component => {
const ContextWrapper = (props, context) => (
);
ContextWrapper.contextTypes = contextTypes;
return hoistStatics(ContextWrapper, Component);
};
class ConnectedComponent extends Component {
static propTypes = {
stripes: stripesShape.isRequired
}
constructor(props) {
super(props);
this.connectedComponent = props.stripes.connect(WrappedComponent, options);
}
render() {
return ;
}
}
return withStripes(hoistNonReactStatics(ConnectedComponent, WrappedComponent));
}
export const withApollo = Component => hoistNonReactStatics(
React.forwardRef((props, ref) => (
{client => }
)),
Component,
)
function RouteDispatcherHoc(displayNamePrefix, routeConfig, options) {
const routerDispatcher = ({ routes, ...props }) => {
return (
);
};
routerDispatcher.displayName = `${displayNamePrefix}(${reactDisplayName(RouteDispatcher)})`;
routerDispatcher.propTypes = RouteDispatcher.propTypes;
return hoistNonReactStatic(routerDispatcher, RouteDispatcher);
}
export default Page =>
hoistStatics(
class extends React.Component {
static displayName = getDisplayName("applyRedirect", Page);
static async getInitialProps(ctx) {
const {
defaultLocale,
locale,
method,
redirects = {},
siteLocales
} = process.browser ? window.__NEXT_DATA__.props : ctx.req;
if (process.browser) {
for (const from of Object.keys(redirects)) {
const { method: redirectMethod, page, to } = ensureRedirect(
redirects[from]
);
export function withLocalize(
WrappedComponent: ComponentType
): ComponentType<$Diff> {
class LocalizedComponent extends Component {
render() {
return (
{context => }
);
}
}
hoistNonReactStatic(LocalizedComponent, WrappedComponent);
return LocalizedComponent;
}