Skip to content

Commit

Permalink
close #12
Browse files Browse the repository at this point in the history
  • Loading branch information
fundon committed Oct 4, 2023
1 parent c2ba960 commit d079dec
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions app/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ zh-cn = []
[dependencies]
console_log = "1"
log = "0.4"
leptos = "0.5.0-rc1"
leptos_dom = "0.5.0-rc1"
leptos_router = { version = "0.5.0-rc1", features = ["csr"] }
leptos_meta = { version = "0.5.0-rc1", features = ["csr"] }
leptos = "0.5.0"
leptos_dom = "0.5.0"
leptos_router = { version = "0.5.0", features = ["csr"] }
leptos_meta = { version = "0.5.0", features = ["csr"] }
serde = { version = "1", features = ["derive"] }
futures = "0.3"
console_error_panic_hook = "0.1"
Expand Down
6 changes: 3 additions & 3 deletions app/src/components/sidebar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,21 @@ pub fn Sidebar(#[prop(into)] version: ReadSignal<String>) -> impl IntoView {
}
>
{
move || sections.read()
move || sections.get()
.flatten()
.map(move |sections| {
view! {
<For
each=move || sections.clone()
key=|section| section.text.clone()
view=move |Section { text, prefix, items }| view! {
children=move |Section { text, prefix, items }| view! {
<section>
<h3 class="py-1 text-4 font-medium">{text}</h3>
<ul class="text-3.5">
<For
each=move || items.clone()
key=|item| item.0.clone()
view=move |(text, path)| {
children=move |(text, path)| {
let prefix = prefix.clone();
view! {
<li>
Expand Down
2 changes: 1 addition & 1 deletion app/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pub fn App() -> impl IntoView {
let (lang, set_lang) = create_signal(LANGS[0][0].to_string());
let (version, set_version) = create_signal(VERSIONS[0].to_string());

view! { cx,
view! {
<Router>
<div id="app" class="tracking-0.2px">
<Navbar
Expand Down
4 changes: 2 additions & 2 deletions app/src/pages/doc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ pub fn Doc() -> impl IntoView {
let page = create_resource(
move || current_params.get().ok(),
move |input| async move {
set_loading.set(true);
set_loading.set(true);
let params = input?;
let DocParams { version, path } = params;
let v = version.unwrap_or_default();
Expand All @@ -61,7 +61,7 @@ pub fn Doc() -> impl IntoView {

create_effect(move |_| {
set_loading.set(false);
let page = page.read()??;
let page = page.get()??;
let root = container.get()?;
root.set_inner_html(&page);

Expand Down

0 comments on commit d079dec

Please sign in to comment.