Skip to content

Commit

Permalink
fix pager position
Browse files Browse the repository at this point in the history
  • Loading branch information
The-DevBlog committed Feb 23, 2024
1 parent 6c509ed commit 26c15b7
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions devblog/devblog/client/src/components/pager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,12 @@ pub fn pager(props: &Props) -> Html {
<div class={style}>
<div class="pager">
// PAGE LEFT
if props.page_num > 1 {
<span onclick={page(-1)}><ArrowLeftIcon /></span>
}
<span class={if props.page_num > 1 {"arrow-visible"} else {"arrow-hidden"}} onclick={page(-1)}><ArrowLeftIcon /></span>

<span>{props.page_num}</span>

// PAGE RIGHT
if props.page_num < props.total_pages {
<span onclick={page(1)}><ArrowRightIcon /></span>
}
<span class={if props.page_num < props.total_pages {"arrow-visible"} else {"arrow-hidden"}} onclick={page(1)}><ArrowRightIcon /></span>
</div>
</div>
}
Expand Down

0 comments on commit 26c15b7

Please sign in to comment.