A few more api call basics

This commit is contained in:
2022-07-05 21:15:42 -05:00
parent 2fa58305cb
commit d1495df5a1
4 changed files with 108 additions and 39 deletions

View File

@@ -19,6 +19,15 @@ function Home() {
Once you have logged in you should be able to click in{" "}
<i>Profile</i> and <i>Logout</i>
</p>
</>
)}
{user && (
<>
<h4>Rendered user info on the client</h4>
<img src={user.picture} alt="user picture" />
<p>nickname: {user.nickname}</p>
<p>name: {user.name}</p>
<p>
<form method="POST" action="/api/v1/bookmarks">
<label for="title">title: </label>
@@ -31,15 +40,6 @@ function Home() {
</p>
</>
)}
{user && (
<>
<h4>Rendered user info on the client</h4>
<img src={user.picture} alt="user picture" />
<p>nickname: {user.nickname}</p>
<p>name: {user.name}</p>
</>
)}
</Layout>
);
}