From 5dfe38f8202b07524f072bf261b64fab6097426c Mon Sep 17 00:00:00 2001 From: Pratik Mishra Date: Wed, 28 Aug 2024 15:52:08 +0530 Subject: [PATCH] fix: empty-override-prompt-text --- crates/frontend/src/pages/context_override.rs | 43 +++++++++++++------ 1 file changed, 29 insertions(+), 14 deletions(-) diff --git a/crates/frontend/src/pages/context_override.rs b/crates/frontend/src/pages/context_override.rs index 2e7bcf61..8552c2fc 100644 --- a/crates/frontend/src/pages/context_override.rs +++ b/crates/frontend/src/pages/context_override.rs @@ -335,20 +335,35 @@ pub fn context_override() -> impl IntoView { (context.clone(), overrides) }) .collect::)>>(); - ctx_n_overrides - .into_iter() - .map(|(context, overrides)| { - view! { - - } - }) - .collect_view() + if ctx_n_overrides.is_empty() { + view! { +
+
+ +
+
+ "Start with creating an override" +
+
+ + }.into_view() + } else { + ctx_n_overrides + .into_iter() + .map(|(context, overrides)| { + view! { + + } + }) + .collect_view() + } + }}