Live video on the AT Protocol

dont show back button iff we're on desktop lol

authored by

Natalie Bridgers and committed by
Natalie B.
bc5229a4 10b4c51f

+54 -50
+54 -50
js/app/components/mobile/user-offline.tsx
··· 12 12 import { overflow } from "@streamplace/components/src/lib/theme/atoms"; 13 13 import { ChevronLeft } from "lucide-react-native"; 14 14 import { useEffect, useState } from "react"; 15 - import { Image, Pressable, useWindowDimensions } from "react-native"; 15 + import { Image, Platform, Pressable, useWindowDimensions } from "react-native"; 16 16 import { DesktopUi } from "./desktop-ui"; 17 17 18 18 const { bg, borders, flex, gap, h, layout, mt, position, px, py, r, text, w } = ··· 54 54 ]} 55 55 > 56 56 {/* Back Button and Profile */} 57 - <View 58 - style={[ 59 - { 60 - padding: 3, 61 - paddingRight: 8, 62 - backgroundColor: "rgba(90,90,90, 0.25)", 63 - borderRadius: 12, 64 - alignSelf: "flex-start", 65 - zIndex: 100, 66 - }, 67 - r.lg, 68 - layout.position.absolute, 69 - position.left[4], 70 - useCompactLayout ? position.top[4] : position.top[0], 71 - ]} 72 - > 73 - <View style={[layout.flex.row, layout.flex.center, gap.all[2]]}> 74 - <Pressable 75 - onPress={() => { 76 - if (navigation.canGoBack()) { 77 - navigation.goBack(); 78 - } else { 79 - navigation.reset({ 80 - index: 0, 81 - routes: [{ name: "Home", params: { screen: "StreamList" } }], 82 - }); 57 + {Platform.OS !== "web" && ( 58 + <View 59 + style={[ 60 + { 61 + padding: 3, 62 + paddingRight: 8, 63 + backgroundColor: "rgba(90,90,90, 0.25)", 64 + borderRadius: 12, 65 + alignSelf: "flex-start", 66 + zIndex: 100, 67 + }, 68 + r.lg, 69 + layout.position.absolute, 70 + position.left[4], 71 + useCompactLayout ? position.top[4] : position.top[0], 72 + ]} 73 + > 74 + <View style={[layout.flex.row, layout.flex.center, gap.all[2]]}> 75 + <Pressable 76 + onPress={() => { 77 + if (navigation.canGoBack()) { 78 + navigation.goBack(); 79 + } else { 80 + navigation.reset({ 81 + index: 0, 82 + routes: [ 83 + { name: "Home", params: { screen: "StreamList" } }, 84 + ], 85 + }); 86 + } 87 + }} 88 + > 89 + <ChevronLeft color="white" /> 90 + </Pressable> 91 + <Image 92 + source={ 93 + profile?.did 94 + ? { uri: detailedProfile?.avatar } 95 + : require("assets/images/goose.png") 83 96 } 84 - }} 85 - > 86 - <ChevronLeft color="white" /> 87 - </Pressable> 88 - <Image 89 - source={ 90 - profile?.did 91 - ? { uri: detailedProfile?.avatar } 92 - : require("assets/images/goose.png") 93 - } 94 - style={[ 95 - { 96 - width: 36, 97 - height: 36, 98 - backgroundColor: "green", 99 - }, 100 - { borderRadius: 999 }, 101 - borders.width.thin, 102 - borders.color.gray[700], 103 - ]} 104 - /> 105 - <Text>{profile?.handle}</Text> 97 + style={[ 98 + { 99 + width: 36, 100 + height: 36, 101 + backgroundColor: "green", 102 + }, 103 + { borderRadius: 999 }, 104 + borders.width.thin, 105 + borders.color.gray[700], 106 + ]} 107 + /> 108 + <Text>{profile?.handle}</Text> 109 + </View> 106 110 </View> 107 - </View> 111 + )} 108 112 {/* Banner Background */} 109 113 {detailedProfile?.banner && ( 110 114 <Image