import dayjs from "dayjs"; import relativeTime from "dayjs/plugin/relativeTime"; import prettyBytes from "pretty-bytes"; import Link from "next/link"; import Layout from "../components/Layout"; import authServerSideProps from "../services/authServerSideProps"; import { SkynetClient } from "skynet-js"; import config from "../config"; import useAccountsApi from "../services/useAccountsApi"; import { isFreeTier } from "../services/tiers"; import { write } from "clipboardy"; dayjs.extend(relativeTime); const skynetClient = new SkynetClient(process.env.NEXT_PUBLIC_SKYNET_PORTAL_API); const apiPrefix = process.env.NODE_ENV === "development" ? "/api/stubs" : ""; export const getServerSideProps = authServerSideProps(async (context, api) => { const stripe = await api.get("stripe/prices").json(); const plans = [config.tiers.starter, ...stripe].sort((a, b) => a.tier - b.tier); return { props: { plans } }; }); function SkylinkList({ items = [], timestamp }) { return (
{prettyBytes(item.size)}
no entries yet