···
1
+
import { GmstnLogoColor } from "@/components/icons/gmstn/GmstnLogoColor";
2
+
import { ProfileModalContent } from "@/components/Navigation/TopBar/ProfileModalContent";
3
+
import { useFacet } from "@/lib/facet";
4
+
import { useProfile } from "@/providers/authed/ProfileProvider";
5
+
import { useCurrentPalette } from "@/providers/ThemeProvider";
6
+
import { Image } from "expo-image";
7
+
import { Link } from "expo-router";
8
+
import { useState } from "react";
9
+
import { Modal, Pressable, View } from "react-native";
11
+
export const TopBar = () => {
12
+
const { atoms } = useFacet();
13
+
const { profile } = useProfile();
14
+
const { semantic } = useCurrentPalette();
15
+
const [showProfileModal, setShowProfileModal] = useState(false);
20
+
flexDirection: "row",
21
+
justifyContent: "space-between",
22
+
alignItems: "center",
25
+
backgroundColor: semantic.backgroundDark,
26
+
boxShadow: atoms.boxShadows.sm,
31
+
<View style={{ padding: 8, paddingLeft: 12, paddingTop: 12 }}>
32
+
<GmstnLogoColor height={36} width={36} />
36
+
visible={showProfileModal}
38
+
onRequestClose={() => {
39
+
setShowProfileModal(!showProfileModal);
43
+
style={{ flex: 1, cursor: "auto" }}
45
+
setShowProfileModal(false);
52
+
alignItems: "flex-end",
55
+
e.stopPropagation();
58
+
<ProfileModalContent />
65
+
setShowProfileModal(true);
68
+
{profile?.avatar && (
73
+
borderRadius: atoms.radii.full,
75
+
source={{ uri: profile.avatar }}