import SubscriberTable, {
type SubscriberDataTableProp,
} from "../components/SubscriberTable/SubscriberTable";
import TitleBar from "../components/TitleBar/TitleBar";
async function Home() {
const graphURL = process.env.NEXT_PUBLIC_GRAPH_URL;
const data: SubscriberDataTableProp = await getData();
return (
<>
>
);
}
async function getData() {
const apiUrl = process.env.NEXT_PUBLIC_API_URL_TESTING;
const endpoint = "/api/subscribers";
const headers = {
"Cache-Control": "no-cache",
};
const cacheOption = "no-cache";
const response = await fetch(`${apiUrl}${endpoint}`, {
headers: headers,
cache: cacheOption,
});
if (!response.ok) {
console.log(response.statusText);
}
return response.json();
}
export default Home;