frontend: display user avatar everywhere
Pedro Lucas Porcellis porcellis@eletrotupi.com · 5 months ago
6b4f982cf194aa9934750aa0309b23eb2e6dccf4 Browse filesParents
ded6090Changed files
4
Additions
+4
Deletions
-3
frontend/app/(tabs)/actions.tsx
1 1
import { ThemedText } from '@/components/misc/themed-text';
2 2
import { ThemedView } from '@/components/misc/themed-view';
3 3
import { ScreenLayout } from '@/components/ui/ScreenLayout';
4 4
import { useAuth } from '@/context/AuthContext';
5 5
6 6
export default function Actions() {
7 7
const { user } = useAuth();
8 8
9 9
return (
10 -
<ScreenLayout userName={user.firstName}
10 +
<ScreenLayout userName={user.firstName} userAvatar={user.avatarURL}
11 11
onNotificationPress={() => console.log('Notifications')}
12 12
showNotificationBadge={true}>
13 13
<ThemedView>
14 14
<ThemedText>
15 15
Novo
16 16
</ThemedText>
17 17
</ThemedView>
18 18
</ScreenLayout>
19 19
)
20 20
}
frontend/app/(tabs)/history.tsx
1 1
import { ThemedText } from '@/components/misc/themed-text';
2 2
import { ThemedView } from '@/components/misc/themed-view';
3 3
import { ScreenLayout } from '@/components/ui/ScreenLayout';
4 4
import { useAuth } from '@/context/AuthContext';
5 5
6 6
export default function History() {
7 7
const { user } = useAuth();
8 8
9 9
return (
10 -
<ScreenLayout userName={user.firstName}
10 +
<ScreenLayout userName={user.firstName} userAvatar={user.avatarURL}
11 11
onNotificationPress={() => console.log('Notifications')}
12 12
showNotificationBadge={true}>
13 13
<ThemedView>
14 14
<ThemedText>
15 15
History
16 16
</ThemedText>
17 17
</ThemedView>
18 18
</ScreenLayout>
19 19
)
20 20
}
frontend/app/(tabs)/insights.tsx
1 1
import { ThemedText } from '@/components/misc/themed-text';
2 2
import { ThemedView } from '@/components/misc/themed-view';
3 3
import { ScreenLayout } from '@/components/ui/ScreenLayout';
4 4
import { useAuth } from '@/context/AuthContext';
5 5
import { Card, CardHeader } from '@/components/ui/Cards'
13 13
const backgroundColor = useThemeColor({}, 'background')
14 14
const accentPurple = useThemeColor({}, 'accentPurple')
15 15
16 16
return (
17 17
<ScreenLayout userName={user.firstName}
18 +
userAvatar={user.avatarURL}
18 19
onNotificationPress={() => console.log('Notifications')}
19 20
showNotificationBadge={true}>
20 21
<ThemedView>
21 22
<Section>
22 23
<SectionHeader
35 36
</Section>
36 37
</ThemedView>
37 38
</ScreenLayout>
38 39
)
39 40
}
frontend/app/(tabs)/new/index.tsx
1 1
import { useEffect, useState } from 'react';
2 2
import {
3 3
StyleSheet
4 4
} from 'react-native';
5 5
34 34
// TODO: Set down on camelCase vs kebab case
35 35
router.navigate(`/new/entry?initialMood=${mood}`)
36 36
};
37 37
38 38
return (
39 -
<ScreenLayout userName={user.firstName}
39 +
<ScreenLayout userName={user.firstName} userAvatar={user.avatarURL}
40 40
onNotificationPress={() => console.log('Notifications')}
41 41
showNotificationBadge={true}>
42 42
<ThemedView>
43 43
<Section>
44 44
<SectionHeader
110 110
marginRight: 16,
111 111
marginBottom: 16,
112 112
...Shadows.lg
113 113
}
114 114
});