Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: bump deps and profile modal #946

Merged
merged 10 commits into from
Aug 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"@lenstube/constants": "*",
"@lenstube/generic": "*",
"@lenstube/lens": "*",
"@types/node": "20.4.7",
"@types/node": "20.4.8",
"typescript": "5.1.6"
}
}
2 changes: 1 addition & 1 deletion apps/embed/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"@lenstube/generic": "*",
"@lenstube/lens": "*",
"@lenstube/ui": "*",
"@types/node": "20.4.7",
"@types/node": "20.4.8",
"@types/react": "18.2.18",
"@types/react-dom": "18.2.7",
"autoprefixer": "^10.4.14",
Expand Down
6 changes: 6 additions & 0 deletions apps/mobile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"expo": "~48.0.18",
"expo-av": "~13.2.1",
"expo-blur": "~12.2.2",
"expo-clipboard": "~4.1.2",
"expo-constants": "~14.2.1",
"expo-crypto": "~12.2.1",
"expo-device": "~5.2.1",
Expand All @@ -35,9 +36,11 @@
"expo-linking": "~4.0.1",
"expo-notifications": "~0.18.1",
"expo-sensors": "~12.1.1",
"expo-sharing": "~11.2.2",
"expo-splash-screen": "~0.18.2",
"expo-status-bar": "~1.4.4",
"moti": "^0.25.4",
"qrcode": "^1.5.3",
"react": "18.2.0",
"react-native": "0.71.8",
"react-native-gesture-handler": "~2.9.0",
Expand All @@ -49,7 +52,9 @@
"react-native-safe-area-context": "4.5.0",
"react-native-shared-element": "0.8.8",
"react-native-svg": "13.4.0",
"react-native-view-shot": "3.5.0",
"react-navigation-shared-element": "^3.1.3",
"uuid": "^3.4.0",
"viem": "^1.5.3",
"zustand": "^4.4.0"
},
Expand All @@ -66,6 +71,7 @@
"@lenstube/generic": "*",
"@lenstube/lens": "*",
"@types/node": "20.4.5",
"@types/qrcode": "^1.5.1",
"babel-plugin-module-resolver": "^5.0.0",
"ts-node": "^10.9.1",
"typescript": "^4.9.4"
Expand Down
7 changes: 2 additions & 5 deletions apps/mobile/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import 'react-native-reanimated'
import 'react-native-gesture-handler'

import { ApolloProvider } from '@apollo/client'
import { BottomSheetModalProvider } from '@gorhom/bottom-sheet'
import {
LIVEPEER_STUDIO_API_KEY,
PRIPE_APP_DESCRIPTION,
Expand Down Expand Up @@ -70,15 +69,13 @@ const App = (): JSX.Element => {
<WalletConnectModal
themeMode="dark"
projectId={WC_PROJECT_ID}
explorerExcludedWalletIds="ALL"
// explorerExcludedWalletIds="ALL"
providerMetadata={providerMetadata}
explorerRecommendedWalletIds={explorerRecommendedWalletIds}
/>
<AppLoading>
<GestureHandlerRootView style={styles.gestureHandlerRootView}>
<BottomSheetModalProvider>
<Navigation />
</BottomSheetModalProvider>
<Navigation />
</GestureHandlerRootView>
</AppLoading>
</LivepeerConfig>
Expand Down
4 changes: 2 additions & 2 deletions apps/mobile/src/components/common/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ const AuthenticatedUser = () => {
/>
</SharedElement>
<Sheet sheetRef={profileSheetRef} snap={['60%']}>
<ScrollView style={{ paddingHorizontal: 10 }}>
<ScrollView style={{ paddingHorizontal: 10, paddingVertical: 20 }}>
<Switch />
<View style={{ marginTop: 20, gap: 20 }}>
<View style={{ marginTop: 15, gap: 15 }}>
<Menu>
<MenuItem
icon="person-outline"
Expand Down
19 changes: 10 additions & 9 deletions apps/mobile/src/components/common/UserProfile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,16 @@ const styles = StyleSheet.create({
}
})

const UserProfile: FC<Props> = ({
profile,
size = 25,
radius = 8,
opacity = 1,
onPress,
showHandle = true,
handleStyle
}) => {
const UserProfile: FC<Props> = (props) => {
const {
profile,
size = 25,
radius = 8,
opacity = 1,
onPress,
showHandle = true,
handleStyle
} = props
const { navigate } = useNavigation()

const navigateToProfile = () => {
Expand Down
28 changes: 5 additions & 23 deletions apps/mobile/src/components/common/auth/AuthSheet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { createWalletClient, custom } from 'viem'
import { polygon } from 'viem/chains'
import type { SignableMessage } from 'viem/dist/types/types/misc'

import AnimatedPressable from '~/components/ui/AnimatedPressable'
import Button from '~/components/ui/Button'
import Sheet from '~/components/ui/Sheet'
import haptic from '~/helpers/haptic'
import normalizeFont from '~/helpers/normalize-font'
Expand All @@ -41,14 +41,6 @@ const styles = StyleSheet.create({
flexDirection: 'column',
justifyContent: 'space-between',
gap: 15
},
button: {
padding: 20,
borderRadius: 100,
alignItems: 'center',
borderWidth: 1,
borderColor: theme.colors.grey,
backgroundColor: theme.colors.backdrop2
}
})

Expand Down Expand Up @@ -160,25 +152,15 @@ const AuthSheet: FC<Props> = ({ sheetRef }) => {
signing the message.
</Text>
</View>
<AnimatedPressable

<Button
text="Sign & Verify"
disabled={loading}
onPress={() => {
haptic()
signIn()
}}
style={styles.button}
>
<Text
style={{
color: theme.colors.white,
fontFamily: 'font-medium',
fontSize: normalizeFont(18),
opacity: loading ? 0.3 : 1
}}
>
Sign & Verify
</Text>
</AnimatedPressable>
/>
</View>
</Sheet>
)
Expand Down
15 changes: 6 additions & 9 deletions apps/mobile/src/components/common/auth/SignIn.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ const SignIn = () => {
}}
>
{address ? (
<Ionicons
name="log-in-outline"
color={theme.colors.white}
size={25}
/>
) : (
<ExpoImage
source={{
uri: imageCdn(`${STATIC_ASSETS}/mobile/icons/herb.png`, 'AVATAR')
Expand All @@ -38,15 +44,6 @@ const SignIn = () => {
transition={300}
style={{ width: 23, height: 23, borderRadius: 8 }}
/>
) : (
<Ionicons
name="leaf-outline"
style={{
transform: [{ rotate: '90deg' }]
}}
color={theme.colors.blueGrey}
size={20}
/>
)}
</AnimatedPressable>
</>
Expand Down
19 changes: 15 additions & 4 deletions apps/mobile/src/components/common/modals/ProfileModal.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { Profile } from '@lenstube/lens'
import { useProfileQuery } from '@lenstube/lens'
import { useNavigation } from '@react-navigation/native'
import React from 'react'
import React, { useState } from 'react'
import { ActivityIndicator, useWindowDimensions, View } from 'react-native'
import {
useAnimatedScrollHandler,
Expand All @@ -17,9 +17,10 @@ export const ProfileModal = (props: ProfileModalProps): JSX.Element | null => {
const { handle } = props.route.params
const { goBack } = useNavigation()
const { height } = useWindowDimensions()

const contentScrollY = useSharedValue(0)

const [infoHeaderHeight, setInfoHeaderHeight] = useState(0)

const scrollHandler = useAnimatedScrollHandler({
onScroll: (event) => {
const halfScreen = height / 2
Expand Down Expand Up @@ -61,8 +62,18 @@ export const ProfileModal = (props: ProfileModalProps): JSX.Element | null => {
backgroundColor: theme.colors.black
}}
>
<Info profile={profile} contentScrollY={contentScrollY} />
<TabContent profile={profile} scrollHandler={scrollHandler} />
<Info
profile={profile}
contentScrollY={contentScrollY}
infoHeaderHeight={infoHeaderHeight}
setInfoHeaderHeight={setInfoHeaderHeight}
/>
<TabContent
profile={profile}
contentScrollY={contentScrollY}
infoHeaderHeight={infoHeaderHeight}
scrollHandler={scrollHandler}
/>
</View>
)
}
4 changes: 2 additions & 2 deletions apps/mobile/src/components/explore/Filters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ const styles = StyleSheet.create({
gap: 3,
borderRadius: 25,
borderWidth: 1,
borderColor: theme.colors.secondary,
marginRight: 10
borderColor: theme.colors.secondary
},
text: {
fontFamily: 'font-bold',
Expand Down Expand Up @@ -58,6 +57,7 @@ const Filters = () => {
style={styles.container}
horizontal={true}
showsHorizontalScrollIndicator={false}
contentContainerStyle={{ gap: 10 }}
>
<Pressable
onPress={() => {
Expand Down
2 changes: 1 addition & 1 deletion apps/mobile/src/components/home/FirstSteps.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ const styles = StyleSheet.create({
width: 170,
height: 170,
padding: 18,
marginRight: 6,
borderWidth: 0.5,
borderColor: theme.colors.secondary
},
Expand Down Expand Up @@ -97,6 +96,7 @@ const FirstSteps = () => {
<ScrollView
horizontal={true}
showsHorizontalScrollIndicator={false}
contentContainerStyle={{ gap: 6 }}
style={{
paddingTop: 20
}}
Expand Down
2 changes: 1 addition & 1 deletion apps/mobile/src/components/home/PopularCreators.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ const styles = StyleSheet.create({
justifyContent: 'space-between',
borderRadius: BORDER_RADIUS,
overflow: 'hidden',
marginRight: 6,
borderWidth: 1,
borderColor: theme.colors.grey
},
Expand Down Expand Up @@ -68,6 +67,7 @@ const PopularCreators = () => {
<ScrollView
horizontal={true}
showsHorizontalScrollIndicator={false}
contentContainerStyle={{ gap: 5 }}
style={{
paddingTop: 20
}}
Expand Down
15 changes: 0 additions & 15 deletions apps/mobile/src/components/profile/Gallery.tsx

This file was deleted.

Loading