use crate::pages::*;
use leptos::{prelude::*, reactive_graph::wrappers::write::SignalSetter};
use leptos_meta::provide_meta_context;
use leptos_router::{
components::{ParentRoute, Route, Router, Routes},
StaticSegment,
};
// use leptos_use::{
// storage::use_local_storage,
// utils::{FromToStringCodec, StringCodec},
// };
use thaw::*;
#[component]
pub fn App() -> impl IntoView {
let is_routing = RwSignal::new(false);
let set_is_routing = SignalSetter::map(move |is_routing_data| {
is_routing.set(is_routing_data);
});
provide_meta_context();
view! {
}
}
#[component]
fn TheRouter(is_routing: RwSignal) -> impl IntoView {
let loading_bar = use_loading_bar();
_ = is_routing.watch(move |is_routing| {
if *is_routing {
loading_bar.start();
} else {
loading_bar.finish();
}
});
view! {
// //
// //
// //
{
view! {
}
}
{
view! {
//
}
}
{
view! {
//
}
}
//
//
//
}
}
#[component]
fn TheProvider(children: Children) -> impl IntoView {
// let (read_theme, _, _) = use_local_storage::("theme");
// let theme = RwSignal::new(Theme::from(read_theme.get_untracked()));
view! {
//
{children()}
//
}
}