import { cache } from "react";

import { getSubscriptions } from "./api";

export const loadSubscriptions = cache(getSubscriptions);

export const loadStatus = cache(() => loadSubscriptions().then(d => d.status));

export const loadSubscriptionsData = cache(() =>
  loadSubscriptions().then(d => d.data)
);
