Skip to content

Commit 47a283d

Browse files
committed
refactor: remove media display logic
1 parent 8df3131 commit 47a283d

1 file changed

Lines changed: 2 additions & 15 deletions

File tree

src/embedded/components/IterableEmbeddedView.tsx

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
import { useMemo } from 'react';
2-
import { View, Text, Image } from 'react-native';
32

43
import { IterableEmbeddedViewType } from '../enums/IterableEmbeddedViewType';
5-
4+
import type { IterableEmbeddedComponentProps } from '../types/IterableEmbeddedComponentProps';
65
import { IterableEmbeddedBanner } from './IterableEmbeddedBanner';
76
import { IterableEmbeddedCard } from './IterableEmbeddedCard';
87
import { 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
};

0 commit comments

Comments
 (0)