24 lines
564 B
JavaScript
24 lines
564 B
JavaScript
import React from "react";
|
|
import { Modal } from "react-native";
|
|
import Gallery from "react-native-image-gallery";
|
|
|
|
export default function MediaCacheOverlay({
|
|
photos,
|
|
previewVisible,
|
|
setPreviewVisible,
|
|
imgIndex,
|
|
setImgIndex,
|
|
}) {
|
|
console.log("photos :>> ", photos);
|
|
return (
|
|
<Modal
|
|
onDismiss={() => setPreviewVisible(false)}
|
|
onRequestClose={() => setPreviewVisible(false)}
|
|
visible={previewVisible}
|
|
transparent={false}
|
|
>
|
|
<Gallery initialPage={imgIndex} style={{ flex: 1 }} images={photos} />
|
|
</Modal>
|
|
);
|
|
}
|