2022-11-07 16:47:46 -05:00
|
|
|
// Copyright 2022 Jeremy Wall (Jeremy@marzhilsltudios.com)
|
2022-06-28 20:29:09 -04:00
|
|
|
//
|
|
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
// you may not use this file except in compliance with the License.
|
|
|
|
// You may obtain a copy of the License at
|
|
|
|
//
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
//
|
|
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
// See the License for the specific language governing permissions and
|
|
|
|
// limitations under the License.
|
2022-11-10 16:33:35 -05:00
|
|
|
use super::{RecipePage, RecipePageProps};
|
2022-11-07 16:47:46 -05:00
|
|
|
use crate::components::recipe::Editor;
|
2022-06-28 20:29:09 -04:00
|
|
|
|
|
|
|
use sycamore::prelude::*;
|
2022-07-21 16:33:55 -04:00
|
|
|
use tracing::instrument;
|
2022-06-28 20:29:09 -04:00
|
|
|
|
2022-12-26 21:56:28 -05:00
|
|
|
#[instrument(skip_all, fields(recipe=props.recipe))]
|
2022-09-25 17:04:46 -04:00
|
|
|
#[component()]
|
2022-11-07 16:47:46 -05:00
|
|
|
pub fn RecipeEditPage<G: Html>(cx: Scope, props: RecipePageProps) -> View<G> {
|
2022-12-26 21:56:28 -05:00
|
|
|
let RecipePageProps { recipe, sh } = props;
|
2022-09-25 17:04:46 -04:00
|
|
|
view! {cx,
|
2022-11-07 16:47:46 -05:00
|
|
|
RecipePage(
|
|
|
|
selected=Some("Edit".to_owned()),
|
2022-12-26 21:56:28 -05:00
|
|
|
recipe=recipe.clone(),
|
|
|
|
) { Editor(recipe) }
|
2022-06-28 20:29:09 -04:00
|
|
|
}
|
|
|
|
}
|