Skip to content
This repository was archived by the owner on Mar 3, 2020. It is now read-only.

Commit e00c59f

Browse files
committed
Fixes series navigation bug
1 parent a972026 commit e00c59f

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

velog-backend/src/router/posts/posts.ctrl.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,9 +358,9 @@ export const readPost = async (ctx: Context): Promise<*> => {
358358
{
359359
model: Post,
360360
attributes: ['id', 'url_slug', 'title'],
361-
order: [['index', 'ASC']],
362361
},
363362
],
363+
order: [['index', 'ASC']],
364364
});
365365
seriesLength = seriesPosts.length;
366366
list = seriesPosts.map(sp => ({

velog-frontend/src/components/post/PostSeriesInfo/PostSeriesInfo.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,14 @@ class PostSeriesInfo extends Component<Props, State> {
9090
목록보기
9191
</div>
9292
<div className="controls">
93-
<Square mode="left" to={index === 0 ? null : `/@${username}`} />
94-
<Square mode="right" to={index === length ? null : `/@${username}/}`} />
93+
<Square
94+
mode="left"
95+
to={index === 1 ? null : `/@${username}/${list[index - 2].url_slug}`}
96+
/>
97+
<Square
98+
mode="right"
99+
to={index === length ? null : `/@${username}/${list[index].url_slug}`}
100+
/>
95101
</div>
96102
</div>
97103
</div>

velog-frontend/src/components/post/PostSeriesInfo/PostSeriesInfo.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@
9999
justify-content: center;
100100
font-size: 1.125rem;
101101
&.disabled {
102-
background: $oc-gray-0;
103-
color: $oc-gray-3;
102+
background: $oc-gray-3;
103+
color: $oc-gray-5;
104104
}
105105
&:not(.disabled) {
106106
&:hover {

0 commit comments

Comments
 (0)