import { CenterCustom, TextCustom, ViewWrapper } from "@/components"; import API_STRORAGE from "@/constants/base-url-api-strorage"; import { MainColor } from "@/constants/color-palet"; import { Image } from "expo-image"; import { useLocalSearchParams } from "expo-router"; import React, { useState } from "react"; import { View } from "react-native"; export default function PreviewImage() { const { id } = useLocalSearchParams(); const [isLoading, setIsLoading] = useState(true); return ( {id ? ( {/* Main Image */} { setIsLoading(false); }} source={API_STRORAGE.GET({ fileId: id as string })} contentFit="contain" style={{ width: "100%", height: "100%" }} // placeholder={require("@/assets/images/loading.gif")} /> {/* Custom Loader Overlay */} {isLoading && ( )} ) : ( File not found )} ); }