import { StyleSheet, View, FlatList, Dimensions, StatusBar, Image, } from "react-native"; import Text from "@components/Text"; import Button from "@components/Button"; import { colors } from "@components/style"; import { router } from "expo-router"; import { useEffect, useState } from "react"; // import { FlashList } from "@shopify/flash-list"; export default function Tab() { const API_HOST = process.env.EXPO_PUBLIC_API_URL.replace("/api/v1", ""); const [data, setData] = useState([]); useEffect(() => { fetchData(); }, []); async function fetchData() { try { const res = await fetch(`${process.env.EXPO_PUBLIC_API_URL}/beer/get`, { method: "GET", credentials: "include", }); const data = await res.json(); setData(data.data); } catch (err) { console.error(err); alert("Something went wrong"); } } return (