Fix the history button props

This commit is contained in:
Evan Almloff committed 2024-02-05 17:51:31 -06:00
1 parent 902d6e2fd7
commit f8003fd9ea
1 file changed
+3 -11
@@ -48,17 +48,13 @@ pub struct HistoryButtonProps {
/// }
/// #
/// # let mut vdom = VirtualDom::new(App);
/// # let _ = vdom.rebuild();
/// # vdom.rebuild_in_place();
/// # assert_eq!(
/// # dioxus_ssr::render(&vdom),
/// # r#"<button disabled="true" dioxus-prevent-default="onclick">go back</button>"#
/// # );
/// ```
#[component]
pub fn GoBackButton(
/// The props...
mut props: HistoryButtonProps,
) -> Element {
pub fn GoBackButton(props: HistoryButtonProps) -> Element {
let HistoryButtonProps { children } = props;
// hook up to router
@@ -124,11 +120,7 @@ pub fn GoBackButton(
/// # r#"<button disabled="true" dioxus-prevent-default="onclick">go forward</button>"#
/// # );
/// ```
#[component]
pub fn GoForwardButton(
/// Props...
mut props: HistoryButtonProps,
) -> Element {
pub fn GoForwardButton(props: HistoryButtonProps) -> Element {
let HistoryButtonProps { children } = props;
// hook up to router