Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/get-size-fix' into performance-b…
Browse files Browse the repository at this point in the history
…oost
  • Loading branch information
stoneliuCS committed Dec 4, 2024
2 parents f1a2f31 + cd7a1ef commit a40094f
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions frontend/components/home/nearby-divelog.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
import { View, Text, Pressable, Animated } from 'react-native';
import Profile from '../profile';
import { useEffect, useState } from 'react';
import { router } from 'expo-router';
import { Image } from 'expo-image';
import ImageSize from 'react-native-image-size';
import { router } from 'expo-router';
import { useEffect, useState } from 'react';
import {
Animated,
Pressable,
Image as ReactNativeImage,
Text,
View,
} from 'react-native';
import usePulsingAnimation from '../../utils/skeleton';
import Profile from '../profile';

interface NearbyDivelogProps {
profilePhoto: string;
Expand All @@ -31,7 +36,7 @@ const NearbyDiveLog: React.FC<NearbyDivelogProps> = ({
Image.prefetch(profilePhoto),
]);

const { width, height } = await ImageSize.getSize(coverPhoto);
const { width, height } = await ReactNativeImage.getSize(coverPhoto);
setAspectRatio(width / height);
setIsLoading(false);
} catch (error) {
Expand Down

0 comments on commit a40094f

Please sign in to comment.