fix: tests

This commit is contained in:
Jonathan Kelley committed 2022-01-05 17:30:12 -05:00
1 parent e2a6454527
commit bd341f5571
17 files changed
+305 -300

No files matched your search

+1 -1
View File
@@ -38,7 +38,7 @@ pub struct LinkProps<'a> {
}
pub fn Link<'a>(cx: Scope<'a, LinkProps<'a>>) -> Element {
let service = cx.consume_context::<RouterService>().unwrap();
let service = cx.consume_context::<RouterService>()?;
cx.render(rsx! {
a {
href: "{cx.props.to}",
+2 -2
View File
@@ -15,7 +15,7 @@ impl<'a> UseRoute<'a> {
todo!()
}
pub fn last_segment(&self) -> Option<&str> {
pub fn last_segment(&self) -> Option<&'a str> {
todo!()
}
@@ -25,6 +25,6 @@ impl<'a> UseRoute<'a> {
}
}
pub fn use_route(cx: &ScopeState) -> UseRoute {
pub fn use_route<'a>(cx: &'a ScopeState) -> UseRoute<'a> {
todo!()
}