Commit 85ad82ed authored by IronHammer Std's avatar IronHammer Std
Browse files

小动一下布局

parent 34c8e89c
...@@ -261,14 +261,14 @@ function App() { ...@@ -261,14 +261,14 @@ function App() {
</div> </div>
<h2>评论列表</h2> <h2>评论列表</h2>
<div className="refresh-button"> <div className="refresh-button">
<p>{commentCount}条评论</p> {comments.length !== 0 && <p>{commentCount}条评论</p>}
{comments.length === 0 && <p>暂无评论</p>}
<button type="button" onClick={fetchComments} disabled={loading}> <button type="button" onClick={fetchComments} disabled={loading}>
{loading ? '↻...' : ''} {loading ? '↻...' : ''}
</button> </button>
</div> </div>
<div className="comments-container"> <div className="comments-container">
{!loading && error && <p className="error">{error}</p>} {!loading && error && <p className="error">{error}</p>}
{!loading && comments.length === 0 && <p>暂无评论</p>}
<ul> <ul>
{comments.map((comment) => ( {comments.map((comment) => (
<li key={comment.id}> <li key={comment.id}>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment