use dioxus::prelude::*;

use crate::viewer::{ViewerPage, demo_model_for_route};

#[component]
pub(crate) fn Viewer(model_id: String) -> Element {
    let model = demo_model_for_route(&model_id);

    rsx! {
        main { class: "viewer-route-page",
            ViewerPage { key: "{model.id}", initial_model: model }
        }
    }
}
