*/}
-
-
-
+
+
+
);
}
\ No newline at end of file
diff --git a/src/pages/course/[slug].js b/src/pages/course/[slug].js
index 698647b..61a34b5 100644
--- a/src/pages/course/[slug].js
+++ b/src/pages/course/[slug].js
@@ -28,6 +28,7 @@ const Course = () => {
const getCourse = async () => {
if (slug) {
const fetchedCourse = await fetchSingleEvent(slug);
+ console.log('fetched course:', fetchedCourse);
const formattedCourse = parseEvent(fetchedCourse);
setCourse(formattedCourse);
}
diff --git a/src/pages/details/[slug].js b/src/pages/details/[slug].js
index 218b3d8..6f7e9df 100644
--- a/src/pages/details/[slug].js
+++ b/src/pages/details/[slug].js
@@ -76,8 +76,9 @@ export default function Details() {
useEffect(() => {
const fetchAuthor = async (pubkey) => {
- const author = await fetchKind0([{ authors: [pubkey], kinds: [0] }], {});
+ const author = await fetchKind0(pubkey);
const fields = await findKind0Fields(author);
+ console.log('fields:', fields);
if (fields) {
setAuthor(fields);
}
@@ -85,7 +86,7 @@ export default function Details() {
if (event) {
fetchAuthor(event.pubkey);
}
- }, [event]);
+ }, [fetchKind0, event]);
useEffect(() => {
if (event) {