Co-authored-by: Tomek Zawadzki <tomekzawadzki98@gmail.com>
Co-authored-by: vineyardbovines <spencerfpope@gmail.com>
This commit is contained in:
Oleksii Bulenok
2026-08-18 16:46:11 +02:00
committed by GitHub
parent 7f59d8fcfb
commit 45aa1a67b0
75 changed files with 3128 additions and 3584 deletions
@@ -7,15 +7,12 @@ import {
useRef,
} from 'react'
import {View} from 'react-native'
import type ViewShot from 'react-native-view-shot'
import {type ViewShotRef} from 'react-native-view-shot'
import {useAvatar} from '#/screens/Onboarding/StepProfile/index'
import {atoms as a} from '#/alf'
const LazyViewShot = lazy(
// @ts-expect-error dynamic import
() => import('react-native-view-shot/src/index'),
)
const LazyViewShot = lazy(() => import('react-native-view-shot'))
const SIZE_MULTIPLIER = 5
@@ -28,7 +25,7 @@ export interface PlaceholderCanvasRef {
export const PlaceholderCanvas = forwardRef<PlaceholderCanvasRef, {}>(
function PlaceholderCanvas({}, ref) {
const {avatar} = useAvatar()
const viewshotRef = useRef<ViewShot>(null)
const viewshotRef = useRef<ViewShotRef>(null)
const Icon = avatar.placeholder.component
const styles = useMemo(
@@ -107,6 +107,7 @@ export function StepProfile() {
const response = await sheetWrapper(
launchImageLibraryAsync({
exif: false,
shouldDownloadFromNetwork: true,
mediaTypes: ['images'],
quality: 1,
...opts,
+1 -2
View File
@@ -95,8 +95,7 @@ export function StepInfo({
tldtsRef.current = tldts
})
// This will get used in the avatar creator a few steps later, so lets preload it now
// @ts-expect-error - valid path
void import('react-native-view-shot/src/index')
void import('react-native-view-shot')
}, [])
const onNextPress = () => {