Skip to content

Commit

Permalink
fix: override-page-empty-prompt-text (#216)
Browse files Browse the repository at this point in the history
Co-authored-by: Pratik Mishra <[email protected]>
  • Loading branch information
pratikmishra356 and Pratik Mishra committed Sep 2, 2024
1 parent 41073fc commit 1adf631
Showing 1 changed file with 29 additions and 14 deletions.
43 changes: 29 additions & 14 deletions crates/frontend/src/pages/context_override.rs
Original file line number Diff line number Diff line change
Expand Up @@ -335,20 +335,35 @@ pub fn context_override() -> impl IntoView {
(context.clone(), overrides)
})
.collect::<Vec<(Context, Map<String, Value>)>>();
ctx_n_overrides
.into_iter()
.map(|(context, overrides)| {
view! {
<ContextCard
context=context
overrides=overrides
handle_edit=handle_context_edit
handle_clone=handle_context_clone
handle_delete=handle_context_delete
/>
}
})
.collect_view()
if ctx_n_overrides.is_empty() {
view! {
<div class="flex-row" style="margin-top:20rem;">
<div class="flex justify-center text-gray-400">
<i class="ri-file-add-line ri-xl"></i>
</div>
<div class="flex mt-4 font-semibold items-center text-gray-400 text-xl justify-center">
"Start with creating an override"
</div>
</div>

}.into_view()
} else {
ctx_n_overrides
.into_iter()
.map(|(context, overrides)| {
view! {
<ContextCard
context=context
overrides=overrides
handle_edit=handle_context_edit
handle_clone=handle_context_clone
handle_delete=handle_context_delete
/>
}
})
.collect_view()
}

}}

</div>
Expand Down

0 comments on commit 1adf631

Please sign in to comment.