Skip to content

Commit

Permalink
Fix navigate buttons in topbar
Browse files Browse the repository at this point in the history
  • Loading branch information
Ovenoboyo committed Dec 26, 2024
1 parent 94f0a80 commit e946a6a
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/components/topbar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::rc::Rc;
use crate::icons::{spotify_icon::SpotifyIcon, youtube_icon::YoutubeIcon};
use leptos::{
component, create_effect, create_node_ref, create_rw_signal, create_write_slice, ev::Event,
event_target_value, expect_context, view, CollectView, IntoView, RwSignal, SignalGet,
event_target_value, expect_context, view, window, CollectView, IntoView, RwSignal, SignalGet,
SignalGetUntracked, SignalSet, SignalUpdate,
};
use leptos_router::use_navigate;
Expand Down Expand Up @@ -258,10 +258,14 @@ pub fn TopBar() -> impl IntoView {
// Prev next buttons
<div class="row justify-content-between">
<div class="col-6">
<PrevIcon />
<PrevIcon on:click=move |_| {
window().history().unwrap().back().unwrap();
} />
</div>
<div class="col-6">
<NextIcon />
<NextIcon on:click=move |_| {
window().history().unwrap().forward().unwrap();
} />
</div>
</div>
</div>
Expand Down

0 comments on commit e946a6a

Please sign in to comment.