chore: clean up the repo some

This commit is contained in:
Jonathan Kelley committed 2022-12-06 17:50:25 -08:00
1 parent 5a0ae67ccb
commit 5673017def
13 files changed
+30 -27

No files matched your search

+1 -1
View File
@@ -105,7 +105,7 @@ pub fn Link<'a>(cx: Scope<'a, LinkProps<'a>>) -> Element {
}
};
let route = use_route(&cx);
let route = use_route(cx);
let url = route.url();
let path = url.path();
let active = path == cx.props.to;
+1 -1
View File
@@ -32,7 +32,7 @@ pub struct RedirectProps<'a> {
///
/// It will replace the current route rather than pushing the current one to the stack.
pub fn Redirect<'a>(cx: Scope<'a, RedirectProps<'a>>) -> Element {
let router = use_router(&cx);
let router = use_router(cx);
let immediate_redirect = cx.use_hook(|| {
if let Some(from) = cx.props.from {
+1 -1
View File
@@ -42,7 +42,7 @@ pub fn Route<'a>(cx: Scope<'a, RouteProps<'a>>) -> Element {
});
// submit our rout
router_root.register_total_route(route_context.total_route.clone(), cx.scope_id());
router_root.register_total_route(route_context.total_route, cx.scope_id());
});
log::trace!("Checking Route: {:?}", cx.props.to);
+1 -1
View File
@@ -41,7 +41,7 @@ pub struct RouterProps<'a> {
pub fn Router<'a>(cx: Scope<'a, RouterProps<'a>>) -> Element {
let svc = use_context_provider(cx, || {
RouterService::new(
&cx,
cx,
RouterCfg {
base_url: cx.props.base_url.map(|s| s.to_string()),
active_class: cx.props.active_class.map(|s| s.to_string()),