import * as React from "react"; import { useQuery, gql } from "@apollo/client"; import { Quantity } from "@spendcook/api-types"; const BOOKS = gql` query { shoppingList { quantity ingredient { title } } } `; export default function Shopping() { const { data } = useQuery<{ shoppingList: Quantity[]; }>(BOOKS); if (!data) { return null; } return ( <>