invoices
This commit is contained in:
parent
97b6f02369
commit
c9891a6e4b
|
@ -1,7 +1,22 @@
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import Layout from "../components/Layout";
|
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() {
|
export default function Payments() {
|
||||||
|
const { data: invoices, error } = useSWR(`${apiPrefix}/square/invoices`, fetcher);
|
||||||
|
|
||||||
|
console.log(invoices);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Layout title="Payments">
|
<Layout title="Payments">
|
||||||
<div className="bg-white rounded-lg shadow px-5 py-6 sm:px-6">
|
<div className="bg-white rounded-lg shadow px-5 py-6 sm:px-6">
|
||||||
|
|
Reference in New Issue