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
+3 -6
View File
@@ -2,7 +2,7 @@ import {lazy, useState} from 'react'
import {View} from 'react-native'
// @ts-expect-error missing types
import QRCode from 'react-native-qrcode-styled'
import type ViewShot from 'react-native-view-shot'
import {type ViewShotRef} from 'react-native-view-shot'
import {Trans} from '@lingui/react/macro'
import {Logo} from '#/view/icons/Logo'
@@ -14,10 +14,7 @@ import {IS_WEB} from '#/env'
import {app} from '#/lexicons'
import * as bsky from '#/types/bsky'
const LazyViewShot = lazy(
// @ts-expect-error dynamic import
() => import('react-native-view-shot/src/index'),
)
const LazyViewShot = lazy(() => import('react-native-view-shot'))
export function QrCode({
starterPack,
@@ -26,7 +23,7 @@ export function QrCode({
}: {
starterPack: app.bsky.graph.defs.StarterPackView
link: string
ref: React.Ref<ViewShot>
ref: React.Ref<ViewShotRef>
}) {
const {record} = starterPack
+6 -3
View File
@@ -1,7 +1,10 @@
import {Suspense, useRef, useState} from 'react'
import {View} from 'react-native'
import type ViewShot from 'react-native-view-shot'
import {requestPermissionsAsync, saveToLibraryAsync} from 'expo-media-library'
import {type ViewShotRef} from 'react-native-view-shot'
import {
requestPermissionsAsync,
saveToLibraryAsync,
} from 'expo-media-library/legacy'
import * as Sharing from 'expo-sharing'
import {msg} from '@lingui/core/macro'
import {useLingui} from '@lingui/react'
@@ -38,7 +41,7 @@ export function QrCodeDialog({
const [isSaveProcessing, setIsSaveProcessing] = useState(false)
const [isCopyProcessing, setIsCopyProcessing] = useState(false)
const ref = useRef<ViewShot>(null)
const ref = useRef<ViewShotRef>(null)
const getCanvas = (base64: string): Promise<HTMLCanvasElement> => {
return new Promise(resolve => {