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 #973

Merged
merged 33 commits into from
Aug 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
d41bd20
chore: remove unwanted animations
sasicodes Aug 14, 2023
0e0f325
cleanup
sasicodes Aug 14, 2023
770cb6e
cleanup
sasicodes Aug 14, 2023
4797368
feat: replies
sasicodes Aug 14, 2023
78df23e
cleanup
sasicodes Aug 14, 2023
8628885
why-did-you-render
sasicodes Aug 15, 2023
969867c
chore: bump deps (#961)
sasicodes Aug 15, 2023
2795fac
update yarn.lock
sasicodes Aug 15, 2023
62832ea
chore: allow all app ids in testnet (#962)
sasicodes Aug 15, 2023
cfa4017
Merge branch 'main' into optimize
sasicodes Aug 17, 2023
ba4dd6f
chore: update yarn.lock
sasicodes Aug 17, 2023
92a8634
disable logs
sasicodes Aug 17, 2023
a98190a
chore: add gitcoin banner (#964)
sasicodes Aug 17, 2023
c462791
chore: i18n extract (#965)
sasicodes Aug 17, 2023
fd823d8
chore(i18n): sync translations (#966)
github-actions[bot] Aug 17, 2023
69951dc
chore(i18n): sync translations (#967)
github-actions[bot] Aug 17, 2023
65d77a0
feat: recommendations
sasicodes Aug 17, 2023
1026e44
cleanup
sasicodes Aug 18, 2023
94b3d4d
feat: feed types
sasicodes Aug 18, 2023
cff0065
cleanup
sasicodes Aug 18, 2023
f4c2c60
chore: i18n extract (#965)
sasicodes Aug 17, 2023
6fc215a
chore(i18n): sync translations (#966)
github-actions[bot] Aug 17, 2023
ba92d11
chore: bump deps (#970)
sasicodes Aug 19, 2023
b518e3d
chore(i18n): sync translations (#969)
github-actions[bot] Aug 19, 2023
934a154
chore: update video frame radius (#971)
sasicodes Aug 19, 2023
10c366e
fix: video shimmer (#972)
sasicodes Aug 19, 2023
de42040
fix: remove notificated
sasicodes Aug 20, 2023
de53b93
fix: imports
sasicodes Aug 20, 2023
65ae12e
chore: cleanup
sasicodes Aug 20, 2023
5f622a1
chore: remove shared transition
sasicodes Aug 20, 2023
41ad855
chore: cleanup
sasicodes Aug 20, 2023
d1d772b
style: Format code with prettier
deepsource-autofix[bot] Aug 20, 2023
89d863b
Merge branch 'main' into optimize
sasicodes Aug 20, 2023
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
11 changes: 11 additions & 0 deletions apps/mobile/index.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
import './expo-crypto-shim.js'

import { registerRootComponent } from 'expo'
import React from 'react'

import App from './src/App'

// Only require and initialize why-did-you-render in development mode
if (__DEV__) {
const whyDidYouRender = require('@welldone-software/why-did-you-render')
whyDidYouRender(React, {
trackAllPureComponents: false,
trackHooks: false,
logOnDifferentValues: false
})
}

// registerRootComponent calls AppRegistry.registerComponent('main', () => App);
// It also ensures that whether you load the app in Expo Go or in a native build,
// the environment is set up appropriately
Expand Down
70 changes: 35 additions & 35 deletions apps/mobile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web",
"devtools": "react-devtools",
"lint": "eslint . --ext .js,.ts,.tsx",
"eas:build": "eas build --platform ios"
},
Expand All @@ -17,52 +18,49 @@
"@gorhom/bottom-sheet": "^4.4.7",
"@hookform/resolvers": "^3.2.0",
"@livepeer/react-native": "^1.8.0",
"@react-native-async-storage/async-storage": "1.17.11",
"@react-native-community/netinfo": "9.3.7",
"@react-native-async-storage/async-storage": "1.18.2",
"@react-native-community/netinfo": "9.3.10",
"@react-navigation/bottom-tabs": "^6.5.7",
"@react-navigation/native": "^6.1.6",
"@react-navigation/stack": "^6.3.16",
"@shopify/flash-list": "1.4.0",
"@shopify/flash-list": "1.4.3",
"@walletconnect/modal-react-native": "^1.0.0-rc.10",
"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",
"expo-document-picker": "~11.2.2",
"expo-haptics": "~12.2.1",
"expo-image": "~1.0.1",
"expo-image-picker": "~14.1.1",
"expo-linear-gradient": "~12.1.2",
"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",
"expo-system-ui": "~2.2.1",
"expo-video-thumbnails": "~7.2.1",
"expo": "~49.0.7",
"expo-av": "~13.4.1",
"expo-blur": "~12.4.1",
"expo-clipboard": "~4.3.1",
"expo-constants": "~14.4.2",
"expo-crypto": "~12.4.1",
"expo-device": "~5.4.0",
"expo-document-picker": "~11.5.4",
"expo-haptics": "~12.4.0",
"expo-image": "~1.3.2",
"expo-image-picker": "~14.3.2",
"expo-linear-gradient": "~12.3.0",
"expo-linking": "~5.0.2",
"expo-notifications": "~0.20.1",
"expo-sensors": "~12.3.0",
"expo-sharing": "~11.5.0",
"expo-splash-screen": "~0.20.5",
"expo-status-bar": "~1.6.0",
"expo-system-ui": "~2.4.0",
"expo-video-thumbnails": "~7.4.0",
"moti": "^0.26.0",
"qrcode": "^1.5.3",
"react": "18.2.0",
"react-hook-form": "^7.45.4",
"react-native": "0.71.8",
"react-native-gesture-handler": "~2.9.0",
"react-native": "0.72.3",
"react-native-gesture-handler": "~2.12.1",
"react-native-get-random-values": "~1.9.0",
"react-native-modal": "^13.0.1",
"react-native-notificated": "^0.1.0",
"react-native-reanimated": "~2.14.4",
"react-native-reanimated": "~3.3.0",
"react-native-reanimated-carousel": "^3.4.0",
"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",
"react-native-safe-area-context": "4.6.3",
"react-native-svg": "13.9.0",
"react-native-view-shot": "3.7.0",
"swr": "^2.2.1",
"uuid": "^3.4.0",
"viem": "^1.6.0",
"viem": "^1.6.3",
"zod": "^3.22.2",
"zustand": "^4.4.1"
},
Expand All @@ -78,10 +76,12 @@
"@lenstube/config": "*",
"@lenstube/generic": "*",
"@lenstube/lens": "*",
"@types/node": "20.5.0",
"@types/node": "20.5.1",
"@types/qrcode": "^1.5.1",
"@welldone-software/why-did-you-render": "^7.0.1",
"babel-plugin-module-resolver": "^5.0.0",
"react-devtools": "^4.28.0",
"ts-node": "^10.9.1",
"typescript": "^4.9.4"
"typescript": "^5.1.3"
}
}
36 changes: 19 additions & 17 deletions apps/mobile/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,12 @@ import React from 'react'
import { StyleSheet } from 'react-native'
// eslint-disable-next-line import/no-duplicates
import { GestureHandlerRootView } from 'react-native-gesture-handler'
import { SafeAreaProvider } from 'react-native-safe-area-context'

import { AppLoading } from './components'
import AppLoading from './components/common/AppLoading'
import { ToastProvider } from './components/common/toast'
import mobileAuthLink from './helpers/auth-link'
import { Navigation } from './navigation'
import { NotificationsProvider, SafeAreaProvider } from './providers'

const styles = StyleSheet.create({
gestureHandlerRootView: {
Expand Down Expand Up @@ -61,21 +62,22 @@ const App = (): JSX.Element => {
return (
<SafeAreaProvider>
<ApolloProvider client={apolloClient(mobileAuthLink)}>
<LivepeerConfig client={livepeerClient}>
<NotificationsProvider />
<WalletConnectModal
themeMode="dark"
projectId={WC_PROJECT_ID}
explorerExcludedWalletIds="ALL"
providerMetadata={providerMetadata}
explorerRecommendedWalletIds={explorerRecommendedWalletIds}
/>
<AppLoading>
<GestureHandlerRootView style={styles.gestureHandlerRootView}>
<Navigation />
</GestureHandlerRootView>
</AppLoading>
</LivepeerConfig>
<AppLoading>
<ToastProvider>
<LivepeerConfig client={livepeerClient}>
<WalletConnectModal
themeMode="dark"
projectId={WC_PROJECT_ID}
explorerExcludedWalletIds="ALL"
providerMetadata={providerMetadata}
explorerRecommendedWalletIds={explorerRecommendedWalletIds}
/>
<GestureHandlerRootView style={styles.gestureHandlerRootView}>
<Navigation />
</GestureHandlerRootView>
</LivepeerConfig>
</ToastProvider>
</AppLoading>
</ApolloProvider>
</SafeAreaProvider>
)
Expand Down
10 changes: 3 additions & 7 deletions apps/mobile/src/components/bytes/ByteCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ import { useBottomTabBarHeight } from '@react-navigation/bottom-tabs'
import { ResizeMode, Video } from 'expo-av'
import type { FC } from 'react'
import React, { useEffect, useRef } from 'react'
import { StyleSheet, useWindowDimensions } from 'react-native'
import Animated, { FadeIn } from 'react-native-reanimated'
import { StyleSheet, useWindowDimensions, View } from 'react-native'

import { useIsFocused } from '~/hooks/navigation'

Expand Down Expand Up @@ -68,10 +67,7 @@ const ByteCard: FC<Props> = ({ byte, isActive }) => {
}, [isFocused, isActive])

return (
<Animated.View
entering={FadeIn.duration(500)}
style={[styles.byteCard, { height: BYTE_HEIGHT, width }]}
>
<View style={[styles.byteCard, { height: BYTE_HEIGHT, width }]}>
<Video
ref={videoRef}
isLooping
Expand All @@ -87,7 +83,7 @@ const ByteCard: FC<Props> = ({ byte, isActive }) => {
/>

<Overlay byte={byte} />
</Animated.View>
</View>
)
}

Expand Down
6 changes: 4 additions & 2 deletions apps/mobile/src/components/common/AppLoading.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const Splash = () => {

return (
<Animated.View
entering={FadeIn.duration(700)}
entering={FadeIn}
style={{
flex: 1,
alignItems: 'center',
Expand All @@ -62,7 +62,7 @@ const Splash = () => {
)
}

export const AppLoading: FC<PropsWithChildren> = ({ children }) => {
const AppLoading: FC<PropsWithChildren> = ({ children }) => {
const [appLoadingIsVisible, setAppLoadingIsVisible] = useState(true)
const selectedChannelId = useMobilePersistStore(
(state) => state.selectedChannelId
Expand All @@ -88,3 +88,5 @@ export const AppLoading: FC<PropsWithChildren> = ({ children }) => {
// eslint-disable-next-line react/jsx-no-useless-fragment
return <>{children}</>
}

export default AppLoading
18 changes: 6 additions & 12 deletions apps/mobile/src/components/common/AudioCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import {
useWindowDimensions,
View
} from 'react-native'
import { SharedElement } from 'react-navigation-shared-element'

import normalizeFont from '~/helpers/normalize-font'
import { theme } from '~/helpers/theme'
Expand Down Expand Up @@ -86,17 +85,12 @@ const AudioCard: FC<Props> = ({ audio }) => {
<Pressable onPress={() => navigate('WatchVideo', { id: audio.id })}>
<>
<View style={{ display: 'flex', flexDirection: 'row' }}>
<SharedElement id={`video.watch.${audio.id}.thumbnail`}>
<ExpoImage
source={{ uri: thumbnailUrl }}
transition={300}
contentFit="cover"
style={[
styles.thumbnail,
{ width: width / 3, height: width / 3 }
]}
/>
</SharedElement>
<ExpoImage
source={{ uri: thumbnailUrl }}
transition={300}
contentFit="cover"
style={[styles.thumbnail, { width: width / 3, height: width / 3 }]}
/>
<View style={styles.audioInfoContainer}>
<View style={{ gap: 5 }}>
<Text style={styles.title} numberOfLines={2}>
Expand Down
15 changes: 6 additions & 9 deletions apps/mobile/src/components/common/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { useWalletConnectModal } from '@walletconnect/modal-react-native'
import type { FC } from 'react'
import React, { useRef } from 'react'
import { ScrollView, StyleSheet, Text, View } from 'react-native'
import { SharedElement } from 'react-navigation-shared-element'

import haptic from '~/helpers/haptic'
import normalizeFont from '~/helpers/normalize-font'
Expand Down Expand Up @@ -75,14 +74,12 @@ const AuthenticatedUser = () => {

return (
<>
<SharedElement id={`profile.${selectedChannel.handle}`}>
<UserProfile
profile={selectedChannel}
showHandle={false}
size={30}
onPress={() => profileSheetRef.current?.present()}
/>
</SharedElement>
<UserProfile
profile={selectedChannel}
showHandle={false}
size={30}
onPress={() => profileSheetRef.current?.present()}
/>
<Sheet sheetRef={profileSheetRef} snap={['60%']}>
<ScrollView style={{ paddingHorizontal: 10, paddingVertical: 15 }}>
<Switch />
Expand Down
24 changes: 15 additions & 9 deletions apps/mobile/src/components/common/UserProfile.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { getProfilePicture, trimLensHandle } from '@lenstube/generic'
import type { Profile } from '@lenstube/lens'
import { useNavigation } from '@react-navigation/native'
import type { ImageStyle } from 'expo-image'
import { Image as ExpoImage } from 'expo-image'
import type { FC } from 'react'
import React, { memo } from 'react'
Expand All @@ -21,6 +22,7 @@ type Props = {
opacity?: number
onPress?: () => void
handleStyle?: StyleProp<TextStyle>
imageStyle?: ImageStyle
}

const styles = StyleSheet.create({
Expand All @@ -46,7 +48,8 @@ const UserProfile: FC<Props> = (props) => {
onPress,
showHandle = true,
handleStyle,
pressable
pressable,
imageStyle = {}
} = props
const { navigate } = useNavigation()

Expand All @@ -68,14 +71,17 @@ const UserProfile: FC<Props> = (props) => {
}}
contentFit="cover"
transition={500}
style={{
width: size,
height: size,
borderRadius: radius,
borderWidth: 0.5,
borderColor: theme.colors.secondary,
backgroundColor: theme.colors.backdrop
}}
style={[
{
width: size,
height: size,
borderRadius: radius,
borderWidth: 0.5,
borderColor: theme.colors.secondary,
backgroundColor: theme.colors.backdrop
},
imageStyle
]}
/>
{showHandle && (
<Text numberOfLines={1} style={[styles.handle, handleStyle]}>
Expand Down
Loading