File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { useMemo } from 'react' ;
2- import { View , Text , Image } from 'react-native' ;
32
43import { IterableEmbeddedViewType } from '../enums/IterableEmbeddedViewType' ;
5-
4+ import type { IterableEmbeddedComponentProps } from '../types/IterableEmbeddedComponentProps' ;
65import { IterableEmbeddedBanner } from './IterableEmbeddedBanner' ;
76import { IterableEmbeddedCard } from './IterableEmbeddedCard' ;
87import { IterableEmbeddedNotification } from './IterableEmbeddedNotification' ;
9- import type { IterableEmbeddedComponentProps } from '../types/IterableEmbeddedComponentProps' ;
10- import { useEmbeddedView } from '../hooks/useEmbeddedView/useEmbeddedView' ;
118
129/**
1310 * The props for the IterableEmbeddedView component.
@@ -45,15 +42,5 @@ export const IterableEmbeddedView = ({
4542 }
4643 } , [ viewType ] ) ;
4744
48- const { media } = useEmbeddedView ( viewType , props ) ;
49-
50- return Cmp ? (
51- < View >
52- < Text > media.url: { media . url } </ Text >
53- < Text > media.caption: { media . caption } </ Text >
54- < Text > media.shouldShow: { media . shouldShow ? 'true' : 'false' } </ Text >
55- { media . url ? < Image source = { { uri : media . url } } width = { 100 } height = { 100 } /> : null }
56- < Cmp { ...props } />
57- </ View >
58- ) : null ;
45+ return Cmp ? < Cmp { ...props } /> : null ;
5946} ;
You can’t perform that action at this time.
0 commit comments