Files
recipe-manager/client/src/components/derived/CollectionList.tsx
2023-02-13 17:13:37 -06:00

27 lines
605 B
TypeScript

import { useEffect } from "react";
import { useAuthContext } from "../../context/AuthContext"
import API from "../../util/API";
import { Card } from "../ui"
function CollectionList() {
const { user, token } = useAuthContext();
useEffect(() => {
if (user && token) {
(async() => {
const Collections = new API.Collection(token);
const result = await Collections.getAllAuthored();
console.log(result);
})();
}
}, [user])
return (
<Card>
</Card>
)
}
export default CollectionList