import Head from "next/head"; import Image from "next/image"; import styles from "../styles/Home.module.css"; import { parseBeanCount } from "./api/hello"; import Transaction from "../components/Transaction/Transaction"; import Graph from "../components/Graph/Graph"; import Overview from "../components/Overview/Overview"; export default function Home({statements, stats}) { return (
{statements && statements.map((item, index) => { return })}
); } export async function getStaticProps() { const { statements, stats } = parseBeanCount(` 2014-05-05 txn 'Cafe Mogador' 'Lamb tagine with wine' Liabilities:CreditCard:CapitalOne -37.5 USD Expenses:Restaurant 2013-06-04 * 'Cafe A' 'hi' Liabilities:CapitalOne -37.45 USD Expenses:Restaurant `) return { props: { statements, stats } } }