Skip to content

Commit d74383f

Browse files
committed
refactor: clean up Embedded component by removing commented-out code and unused styles
1 parent a5558d6 commit d74383f

2 files changed

Lines changed: 6 additions & 46 deletions

File tree

example/src/components/Embedded/Embedded.styles.ts

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
import { StyleSheet } from 'react-native';
22
import {
3+
backgroundColors,
34
button,
45
buttonText,
6+
colors,
57
container,
68
hr,
7-
link, input, title, subtitle,
8-
colors,
9+
input,
10+
subtitle,
11+
title,
12+
utilityColors,
913
} from '../../constants';
10-
import { utilityColors, backgroundColors } from '../../constants/styles/colors';
1114

1215
const styles = StyleSheet.create({
1316
button,
@@ -19,20 +22,10 @@ const styles = StyleSheet.create({
1922
gap: 16,
2023
paddingHorizontal: 16,
2124
},
22-
embeddedTitle: {
23-
fontSize: 16,
24-
fontWeight: 'bold',
25-
lineHeight: 20,
26-
},
27-
embeddedTitleContainer: {
28-
display: 'flex',
29-
flexDirection: 'row',
30-
},
3125
hr,
3226
inputContainer: {
3327
marginVertical: 10,
3428
},
35-
link,
3629
subtitle: { ...subtitle, textAlign: 'center' },
3730
text: { textAlign: 'center' },
3831
textInput: input,

example/src/components/Embedded/Embedded.tsx

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import {
88
import { useCallback, useState } from 'react';
99
import {
1010
Iterable,
11-
// type IterableAction,
1211
type IterableEmbeddedMessage,
1312
IterableEmbeddedView,
1413
IterableEmbeddedViewType,
@@ -56,35 +55,6 @@ export const Embedded = () => {
5655
});
5756
}, [idsToFetch]);
5857

59-
// const startEmbeddedImpression = useCallback(
60-
// (message: IterableEmbeddedMessage) => {
61-
// Iterable.embeddedManager.startImpression(
62-
// message.metadata.messageId,
63-
// // TODO: check if this should be changed to a number, as per the type
64-
// Number(message.metadata.placementId)
65-
// );
66-
// },
67-
// []
68-
// );
69-
70-
// const pauseEmbeddedImpression = useCallback(
71-
// (message: IterableEmbeddedMessage) => {
72-
// Iterable.embeddedManager.pauseImpression(message.metadata.messageId);
73-
// },
74-
// []
75-
// );
76-
77-
// const handleClick = useCallback(
78-
// (
79-
// message: IterableEmbeddedMessage,
80-
// buttonId: string | null,
81-
// action?: IterableAction | null
82-
// ) => {
83-
// Iterable.embeddedManager.handleClick(message, buttonId, action);
84-
// },
85-
// []
86-
// );
87-
8858
return (
8959
<SafeAreaView style={styles.container}>
9060
<Text style={styles.title}>Embedded</Text>
@@ -100,9 +70,6 @@ export const Embedded = () => {
10070
Enter placement IDs to fetch embedded messages
10171
</Text>
10272
<View style={styles.utilitySection}>
103-
{/* <Text style={styles.text}>
104-
Placement ids: [{placementIds.join(', ')}]
105-
</Text> */}
10673
<View style={styles.viewTypeSelector}>
10774
<Text style={styles.text}>Select View Type:</Text>
10875
<View style={styles.viewTypeButtons}>

0 commit comments

Comments
 (0)