Some checks failed
actionlint check / actionlint check (pull_request) Successful in 5s
checkov check / checkov check (pull_request) Successful in 52s
conventional commit messages check / conventional commit messages check (pull_request) Successful in 4s
conventional pull request title check / conventional pull request title check (pull_request) Successful in 2s
dotenv-linter check / dotenv-linter check (pull_request) Successful in 5s
GitLeaks check / GitLeaks check (pull_request) Successful in 6s
hadolint check / hadolint check (pull_request) Successful in 7s
htmlhint check / htmlhint check (pull_request) Successful in 9s
markdownlint check / markdownlint check (pull_request) Successful in 9s
Prettier check / Prettier check (pull_request) Successful in 10s
Rust check / Rust check (pull_request) Failing after 6m20s
ShellCheck check / ShellCheck check (pull_request) Successful in 12s
Stylelint check / Stylelint check (pull_request) Successful in 11s
yamllint check / yamllint check (pull_request) Successful in 13s
34 lines
1016 B
Rust
34 lines
1016 B
Rust
use crate::components::bottom_panel::BottomPanel;
|
|
use crate::components::form_open_button::FormOpenButton;
|
|
use crate::components::sticky_bottom::StickyBottom;
|
|
use crate::models::project::Project;
|
|
use crate::models::task::Task;
|
|
use crate::route::Route;
|
|
use dioxus::core_macro::rsx;
|
|
use dioxus::dioxus_core::Element;
|
|
use dioxus::prelude::*;
|
|
|
|
#[component]
|
|
pub(crate) fn Layout() -> Element {
|
|
let mut display_form = use_signal(|| false);
|
|
let project_being_edited =
|
|
use_context_provider::<Signal<Option<Project>>>(|| Signal::new(None));
|
|
let task_being_edited = use_context_provider::<Signal<Option<Task>>>(|| Signal::new(None));
|
|
|
|
use_effect(move || {
|
|
display_form.set(project_being_edited().is_some() || task_being_edited().is_some());
|
|
});
|
|
|
|
rsx! {
|
|
Outlet::<Route> {}
|
|
StickyBottom {
|
|
FormOpenButton {
|
|
opened: display_form,
|
|
}
|
|
BottomPanel {
|
|
display_form: display_form,
|
|
}
|
|
}
|
|
}
|
|
}
|