Skip to content

Commit 1db5d80

Browse files
committed
refactor: separate components, remove unused comps
1 parent b79e65d commit 1db5d80

File tree

7 files changed

+100
-268
lines changed

7 files changed

+100
-268
lines changed
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
import {StyleSheet, View} from 'react-native';
2+
import useColors from '@/hooks/useColors';
3+
4+
export default function NotificationItemSkeleton() {
5+
const colors = useColors();
6+
7+
return (
8+
<View
9+
style={[
10+
styles.container,
11+
{
12+
borderColor: colors.border,
13+
},
14+
]}>
15+
<View
16+
style={[
17+
styles.title,
18+
{
19+
backgroundColor: colors.background,
20+
},
21+
]}
22+
/>
23+
<View
24+
style={[
25+
styles.description,
26+
{
27+
backgroundColor: colors.background,
28+
},
29+
]}
30+
/>
31+
</View>
32+
);
33+
}
34+
35+
const styles = StyleSheet.create({
36+
container: {
37+
width: '100%',
38+
display: 'flex',
39+
flexDirection: 'column',
40+
alignItems: 'flex-start',
41+
justifyContent: 'center',
42+
gap: 8,
43+
padding: 12,
44+
borderBottomWidth: 1,
45+
},
46+
title: {
47+
width: '50%',
48+
height: 16,
49+
borderRadius: 4,
50+
},
51+
description: {
52+
width: '70%',
53+
height: 12,
54+
55+
borderRadius: 4,
56+
},
57+
});

dapps/Web3InboxLab/src/components/NotificationItemWithSubscription.tsx

Lines changed: 0 additions & 124 deletions
This file was deleted.

dapps/Web3InboxLab/src/components/NotificationsScreen.tsx

Lines changed: 0 additions & 57 deletions
This file was deleted.
Lines changed: 41 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,60 @@
1-
import {View} from 'react-native';
1+
import {StyleSheet, View} from 'react-native';
22
import useColors from '@/hooks/useColors';
33

4-
export default function SubscriptionItemSkeleton({style}) {
4+
export default function SubscriptionItemSkeleton() {
55
const colors = useColors();
66

77
return (
88
<View
99
style={[
10+
styles.container,
1011
{
11-
width: '100%',
12-
display: 'flex',
13-
flexDirection: 'column',
14-
alignItems: 'flex-start',
15-
justifyContent: 'center',
16-
opacity: 0.8,
17-
gap: 8,
18-
padding: 12,
19-
borderRadius: 12,
20-
borderWidth: 0.5,
2112
borderColor: colors.border,
2213
backgroundColor: colors.background,
2314
},
24-
style,
2515
]}>
2616
<View
27-
style={{
28-
width: '50%',
29-
height: 16,
30-
backgroundColor: colors.backgroundSecondary,
31-
borderRadius: 4,
32-
}}
17+
style={[
18+
styles.title,
19+
{
20+
backgroundColor: colors.backgroundSecondary,
21+
},
22+
]}
3323
/>
3424
<View
35-
style={{
36-
width: '70%',
37-
height: 12,
38-
backgroundColor: colors.backgroundSecondary,
39-
borderRadius: 4,
40-
}}
25+
style={[
26+
styles.description,
27+
{
28+
backgroundColor: colors.backgroundSecondary,
29+
},
30+
]}
4131
/>
4232
</View>
4333
);
4434
}
35+
36+
const styles = StyleSheet.create({
37+
container: {
38+
width: '100%',
39+
display: 'flex',
40+
flexDirection: 'column',
41+
alignItems: 'flex-start',
42+
justifyContent: 'center',
43+
opacity: 0.8,
44+
gap: 8,
45+
padding: 12,
46+
borderRadius: 12,
47+
borderWidth: 0.5,
48+
},
49+
title: {
50+
width: '50%',
51+
height: 16,
52+
borderRadius: 4,
53+
},
54+
description: {
55+
width: '70%',
56+
height: 12,
57+
58+
borderRadius: 4,
59+
},
60+
});

dapps/Web3InboxLab/src/navigation/NotificationsStack.tsx

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)