this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Get books from Bookhive lexicon

modamo-gh 53e36fd7 cfaa7a9e

+15 -5
+15 -5
app/library/page.tsx
··· 12 12 13 13 const agent = new Agent(session); 14 14 15 - let error, profile; 15 + let books, error, profile; 16 16 17 17 try { 18 - const response = await agent.getProfile({ actor: session.did }); 18 + const profileResponse = await agent.getProfile({ actor: session.did }); 19 19 20 - profile = response.data; 20 + profile = profileResponse.data; 21 21 22 - console.log(profile); 22 + const booksResponse = await agent.com.atproto.repo.listRecords({ 23 + collection: "buzz.bookhive.book", 24 + limit: 100, 25 + repo: session.did 26 + }); 27 + 28 + books = booksResponse.data.records; 23 29 } catch (error) { 24 30 console.error("Error fetching profile:", error); 25 31 ··· 41 47 /> 42 48 </div> 43 49 </header> 44 - <div className="bg-emerald-900 rounded-2xl row-span-9"></div> 50 + <div className="bg-emerald-900 rounded-2xl row-span-9"> 51 + {books?.map((book, index) => ( 52 + <p key={index}>{JSON.stringify(book)}</p> 53 + ))} 54 + </div> 45 55 </main> 46 56 ); 47 57 };