import { cache } from "react";

import { getMe } from "./api";

export const loadMe = cache(getMe);

export const loadUser = cache(() => loadMe().then(d => d.user));

export const loadUserId = cache(() => loadUser().then(d => d._id));
