1 | import { requireNativeViewManager } from '@unimodules/core';
|
2 | import nullthrows from 'nullthrows';
|
3 | import React from 'react';
|
4 | import { AdMediaViewContext } from './withNativeAd';
|
5 | export default class AdMediaView extends React.Component {
|
6 | render() {
|
7 | return (React.createElement(AdMediaViewContext.Consumer, null, (contextValue) => {
|
8 | const context = nullthrows(contextValue);
|
9 | return React.createElement(NativeAdMediaView, Object.assign({}, this.props, { ref: context.nativeRef }));
|
10 | }));
|
11 | }
|
12 | }
|
13 |
|
14 | export const NativeAdMediaView = requireNativeViewManager('MediaView');
|
15 |
|
\ | No newline at end of file |