Cleanup dead variables and unused imports, swap ImageBackground for Image in FrameOverlay
This commit is contained in:
@@ -2,7 +2,7 @@ import React from 'react';
|
|||||||
import { StyleSheet, ImageBackground, View } from 'react-native';
|
import { StyleSheet, ImageBackground, View } from 'react-native';
|
||||||
|
|
||||||
interface FrameOverlayProps {
|
interface FrameOverlayProps {
|
||||||
frameAsset: any; // require() asset
|
frameAsset: number | any; // require() asset
|
||||||
isCapturing?: boolean;
|
isCapturing?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -16,10 +16,10 @@ export default function FrameOverlay({ frameAsset, isCapturing = false }: FrameO
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<View style={styles.container} pointerEvents={isCapturing ? "auto" : "none"} collapsable={false}>
|
<View style={styles.container} pointerEvents={isCapturing ? "auto" : "none"} collapsable={false}>
|
||||||
<ImageBackground
|
<Image
|
||||||
source={frameAsset}
|
source={frameAsset}
|
||||||
style={styles.frameImage}
|
style={styles.frameImage}
|
||||||
resizeMode="stretch"
|
resizeMode="cover"
|
||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ import Animated, {
|
|||||||
FadeIn,
|
FadeIn,
|
||||||
FadeOut,
|
FadeOut,
|
||||||
withSequence,
|
withSequence,
|
||||||
withDelay,
|
|
||||||
runOnJS,
|
runOnJS,
|
||||||
} from 'react-native-reanimated';
|
} from 'react-native-reanimated';
|
||||||
import { FontAwesomeIcon } from '@fortawesome/react-native-fontawesome';
|
import { FontAwesomeIcon } from '@fortawesome/react-native-fontawesome';
|
||||||
@@ -290,8 +289,6 @@ export default function CameraScreen({
|
|||||||
triggerFlash();
|
triggerFlash();
|
||||||
|
|
||||||
let capturedUri: string;
|
let capturedUri: string;
|
||||||
let rawWidth: number = 0;
|
|
||||||
let rawHeight: number = 0;
|
|
||||||
|
|
||||||
if (Platform.OS === 'android' && isUsbConnected && usbCameraRef.current) {
|
if (Platform.OS === 'android' && isUsbConnected && usbCameraRef.current) {
|
||||||
// USB Camera Capture
|
// USB Camera Capture
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ export default function PreviewScreen({
|
|||||||
|
|
||||||
// Sticker state
|
// Sticker state
|
||||||
const [stickers, setStickers] = useState<StickerData[]>([]);
|
const [stickers, setStickers] = useState<StickerData[]>([]);
|
||||||
const [selectedImageIndex, setSelectedImageIndex] = useState<number | null>(null);
|
const [selectedStickerId, setSelectedStickerId] = useState<string | null>(null);
|
||||||
|
|
||||||
const mountedRef = useRef(true);
|
const mountedRef = useRef(true);
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user