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