feat: migrate to shadcn toast (sonner)
Some checks failed
Build MIPS Binary / build (push) Has been cancelled
Some checks failed
Build MIPS Binary / build (push) Has been cancelled
- frontend/src/app.rs: Replaced custom ToastContainer with SonnerProvider - frontend/src/store.rs: Updated show_toast to use leptos_shadcn_toast::toast API - frontend/src/components/toast.rs: Deleted custom toast component - frontend/src/components/torrent/add_torrent.rs: Updated toast usage - frontend/src/components/torrent/table.rs: Updated toast usage
This commit is contained in:
@@ -11,7 +11,6 @@ pub fn AddTorrentDialog(
|
||||
on_close: Callback<()>,
|
||||
) -> impl IntoView {
|
||||
let store = use_context::<TorrentStore>().expect("TorrentStore not provided");
|
||||
let notifications = store.notifications;
|
||||
|
||||
let uri = signal(String::new());
|
||||
let is_loading = signal(false);
|
||||
@@ -34,11 +33,7 @@ pub fn AddTorrentDialog(
|
||||
match api::torrent::add(&uri_val).await {
|
||||
Ok(_) => {
|
||||
log::info!("Torrent added successfully");
|
||||
crate::store::show_toast_with_signal(
|
||||
notifications,
|
||||
shared::NotificationLevel::Success,
|
||||
"Torrent başarıyla eklendi"
|
||||
);
|
||||
crate::store::toast_success("Torrent başarıyla eklendi");
|
||||
on_close.run(());
|
||||
}
|
||||
Err(e) => {
|
||||
|
||||
Reference in New Issue
Block a user