From a93e9a2b00726a24504983f82d4ce644e716ddf1 Mon Sep 17 00:00:00 2001 From: Ho Kim Date: Wed, 17 Jul 2024 06:56:26 +0000 Subject: [PATCH] fix: re-export use_fetch function --- crates/cassette-core/src/net/gateway.rs | 2 +- crates/cassette/src/hooks/gateway.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/cassette-core/src/net/gateway.rs b/crates/cassette-core/src/net/gateway.rs index 5cc70ef..724db11 100644 --- a/crates/cassette-core/src/net/gateway.rs +++ b/crates/cassette-core/src/net/gateway.rs @@ -6,7 +6,7 @@ use yew::prelude::*; use super::fetch::{FetchRequest, FetchState}; #[hook] -fn use_fetch( +pub fn use_fetch( request: impl 'static + FnOnce() -> FetchRequest, ) -> UseStateHandle> where diff --git a/crates/cassette/src/hooks/gateway.rs b/crates/cassette/src/hooks/gateway.rs index b0356b1..8c561cc 100644 --- a/crates/cassette/src/hooks/gateway.rs +++ b/crates/cassette/src/hooks/gateway.rs @@ -1,7 +1,7 @@ #[cfg(not(feature = "examples"))] use cassette_core::net::{ - fetch::FetchRequestWithoutBody, - gateway::{use_fetch, Method}, + fetch::{FetchRequestWithoutBody, Method}, + gateway::use_fetch, }; use cassette_core::{ cassette::{Cassette, CassetteRef},