MCPcopy Create free account
hub / github.com/PerroEngine/Perro / DocPageView

Function DocPageView

perro_website/src/pages/docs.rs:88–101  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

86 }}
87 }
88}
89
90#[component]
91pub fn DocPageView() -> impl IntoView {
92 let params = use_params_map();
93 let slug = move || params.read().get("slug").unwrap_or_default();
94 let doc = move || find_doc("docs", &slug());
95
96 view! {
97 {move || match doc() {
98 Some(doc) => view! {
99 <DocArticle doc=doc canonical_path=doc.route_path.clone() />
100 }.into_any(),
101 None => view! { <NotFound /> }.into_any(),
102 }}
103 }
104}

Callers

nothing calls this directly

Calls 3

find_docFunction · 0.85
getMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected