mirror of
https://github.com/mudabbir-ahmad/MAD-Treasure-Hunt.git
synced 2026-10-08 03:00:20 +00:00
added Cache, Event and Find entities for pressable and scrollable components
29 lines
703 B
JavaScript
29 lines
703 B
JavaScript
import { ScrollView, StyleSheet } from "react-native";
|
|
import CacheItem from "./CacheItem";
|
|
|
|
const CacheList = ({ caches, foundCacheIds, onSelect }) => {
|
|
// Initialisations ---------------------
|
|
// State -------------------------------
|
|
// Handlers ----------------------------
|
|
// View --------------------------------
|
|
|
|
return (
|
|
<ScrollView style={styles.container}>
|
|
{caches.map((cache) => (
|
|
<CacheItem
|
|
key={cache.CacheID}
|
|
cache={cache}
|
|
isFound={foundCacheIds.includes(cache.CacheID)}
|
|
onSelect={onSelect}
|
|
/>
|
|
))}
|
|
</ScrollView>
|
|
);
|
|
};
|
|
|
|
const styles = StyleSheet.create({
|
|
container: {},
|
|
});
|
|
|
|
export default CacheList;
|