Skip to content

Commit

Permalink
feat: add unit to query params
Browse files Browse the repository at this point in the history
  • Loading branch information
DDtKey committed Jan 29, 2024
1 parent 197c13d commit 9a58c9c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/web-ui/src/pages/buckets_explorer_page.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ struct BucketsQueryParams {
initial_value: Option<f64>,
factor: Option<f64>,
buckets_num: Option<u32>,
unit: Option<Unit>,
}

#[component]
Expand All @@ -33,7 +34,7 @@ pub(crate) fn BucketsExplorerPage() -> impl IntoView {
let (factor, set_factor) = create_signal(query.factor.unwrap_or(DEFAULT_FACTOR));
let (buckets_num, set_buckets_num) =
create_signal(query.buckets_num.unwrap_or(DEFAULT_BUCKETS_NUM));
let (unit, set_unit) = create_signal(Unit::Number);
let (unit, set_unit) = create_signal(query.unit.unwrap_or(Unit::Number));

let (buckets, set_buckets) = create_signal(Buckets::calculate(
initial_value.get_untracked(),
Expand Down

0 comments on commit 9a58c9c

Please sign in to comment.