This commit is contained in:
Karol Wypchlo 2021-02-22 18:47:10 +01:00
parent 97b6f02369
commit c9891a6e4b
1 changed files with 15 additions and 0 deletions

View File

@ -1,7 +1,22 @@
import Link from "next/link";
import Layout from "../components/Layout";
import dayjs from "dayjs";
import prettyBytes from "pretty-bytes";
import { useState } from "react";
import useSWR from "swr";
import Layout from "../components/Layout";
import Table from "../components/Table";
import authServerSideProps from "../services/authServerSideProps";
import { SkynetClient } from "skynet-js";
const apiPrefix = process.env.NODE_ENV === "development" ? "/api/stubs" : "/api";
const fetcher = (url) => fetch(url).then((r) => r.json());
export default function Payments() {
const { data: invoices, error } = useSWR(`${apiPrefix}/square/invoices`, fetcher);
console.log(invoices);
return (
<Layout title="Payments">
<div className="bg-white rounded-lg shadow px-5 py-6 sm:px-6">