-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
14d34a7
commit 62c74f6
Showing
10 changed files
with
35 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,34 @@ | ||
const Sample = ({loadingPost, loadingUsers, post, users}) => { | ||
return ( | ||
<div> | ||
<section> | ||
<h1>포스트</h1> | ||
{loadingPost && '로딩 중...'} | ||
{!loadingPost && post && ( | ||
<div> | ||
<h3>{post.title}</h3> | ||
<h3>{post.body}</h3> | ||
</div> | ||
)} | ||
</section> | ||
<hr/> | ||
<section> | ||
<h1>사용자 목록</h1> | ||
{lodingUsers && '로딩 중...'} | ||
{!lodingUsers && users && ( | ||
<ul> | ||
{users.map(user => ( | ||
<li key = {user.id}> | ||
{user.username} ({user.email}) | ||
</li> | ||
))} | ||
</ul> | ||
)} | ||
</section> | ||
</div> | ||
); | ||
import React from 'react'; | ||
|
||
const Sample = ({ post, users, loadingPost, loadingUsers }) => { | ||
return ( | ||
<div> | ||
<section> | ||
<h1>포스트</h1> | ||
{loadingPost && '로딩중...'} | ||
{!loadingPost && post && ( | ||
<div> | ||
<h3>{post.title}</h3> | ||
<h3>{post.body}</h3> | ||
</div> | ||
)} | ||
</section> | ||
<hr /> | ||
<section> | ||
<h1>사용자 목록</h1> | ||
{loadingUsers && '로딩중...'} | ||
{!loadingUsers && users && ( | ||
<ul> | ||
{users.map(user => ( | ||
<li key={user.id}> | ||
{user.username} ({user.email}) | ||
</li> | ||
))} | ||
</ul> | ||
)} | ||
</section> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Sample; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.