fix: apply into_any on pages that will not compile
This is a production-only build failure due to type explosion.
This commit is contained in:
1 parent
0b4aae4db3
commit
84212d2360
6 files changed
+27
-33
No files matched your search
@@ -57,5 +57,5 @@ pub fn DashboardButton(
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
</button>
|
</button>
|
||||||
}
|
}.into_any()
|
||||||
}
|
}
|
||||||
@@ -120,5 +120,5 @@ pub fn DateList(
|
|||||||
})
|
})
|
||||||
.collect_view()
|
.collect_view()
|
||||||
}}
|
}}
|
||||||
}
|
}.into_any()
|
||||||
}
|
}
|
||||||
@@ -108,22 +108,21 @@ fn RadioOther(
|
|||||||
// This div displays the box for the checkbox, and applies some styling to the child
|
// This div displays the box for the checkbox, and applies some styling to the child
|
||||||
// span element.
|
// span element.
|
||||||
<div class="relative inline-block min-h-5 min-w-5 h-5 w-5 m-1 mr-2 rounded-full border border-gray-300 bg-white
|
<div class="relative inline-block min-h-5 min-w-5 h-5 w-5 m-1 mr-2 rounded-full border border-gray-300 bg-white
|
||||||
transition-bg duration-200 peer-checked:bg-red-700 peer-checked:border-red-700
|
transition-bg duration-200 peer-checked:bg-red-700 peer-checked:border-red-700
|
||||||
[&>span]:opacity-0 peer-checked:[&>span]:opacity-100
|
[&>span]:opacity-0 peer-checked:[&>span]:opacity-100
|
||||||
peer-disabled:bg-gray-600/33 peer-disabled:border-gray-600
|
peer-disabled:bg-gray-600/33 peer-disabled:border-gray-600
|
||||||
peer-disabled:peer-checked:bg-gray-600">
|
peer-disabled:peer-checked:bg-gray-600">
|
||||||
|
|
||||||
// This span is the check icon. It is centered within the div and has a border on the bottom
|
// This span is the check icon. It is centered within the div and has a border on the bottom
|
||||||
// and right sides, which is then rotated to appear like a checkmark.
|
// and right sides, which is then rotated to appear like a checkmark.
|
||||||
<span
|
<span class="absolute left-1/2 top-1/2 block h-2.5 w-2.5 -translate-x-1/2 -translate-y-1/2
|
||||||
class="absolute left-1/2 top-1/2 block h-2.5 w-2.5 -translate-x-1/2 -translate-y-1/2
|
rotate-45 transform border-3 border-3 rounded-full bg-white
|
||||||
rotate-45 transform border-3 border-3 rounded-full bg-white
|
border-white transition-opacity duration-150"></span>
|
||||||
border-white transition-opacity duration-150"></span>
|
|
||||||
</div>
|
</div>
|
||||||
<input
|
<input
|
||||||
node_ref=input_ref
|
node_ref=input_ref
|
||||||
class="border-b-2 mb-1.5 px-1.5 py-0.5 rounded-t-xs bg-transparent relative flex-1 transition-all duration-150
|
class="border-b-2 mb-1.5 px-1.5 py-0.5 rounded-t-xs bg-transparent relative flex-1 transition-all duration-150
|
||||||
border-red-700 disabled:border-gray-600 disabled:pointer-events-none disabled:bg-gray-600/33"
|
border-red-700 disabled:border-gray-600 disabled:pointer-events-none disabled:bg-gray-600/33"
|
||||||
r#type="text"
|
r#type="text"
|
||||||
disabled=input_disabled
|
disabled=input_disabled
|
||||||
placeholder=placeholder
|
placeholder=placeholder
|
||||||
@@ -243,8 +242,6 @@ pub fn RadioList(
|
|||||||
selected_value.get() == item.get() && !other_checked.get()
|
selected_value.get() == item.get() && !other_checked.get()
|
||||||
});
|
});
|
||||||
let on_change = move || {
|
let on_change = move || {
|
||||||
// on_change only runs when the radio button is checked, not when unchecked.
|
|
||||||
// Change the selected value to the new one.
|
|
||||||
other_checked.set(false);
|
other_checked.set(false);
|
||||||
selected_value.set(item.get());
|
selected_value.set(item.get());
|
||||||
error
|
error
|
||||||
@@ -256,6 +253,8 @@ pub fn RadioList(
|
|||||||
);
|
);
|
||||||
dirty.set(true);
|
dirty.set(true);
|
||||||
};
|
};
|
||||||
|
// on_change only runs when the radio button is checked, not when unchecked.
|
||||||
|
// Change the selected value to the new one.
|
||||||
|
|
||||||
view! {
|
view! {
|
||||||
<Radio
|
<Radio
|
||||||
@@ -270,17 +269,17 @@ pub fn RadioList(
|
|||||||
})
|
})
|
||||||
.collect::<Vec<_>>()}
|
.collect::<Vec<_>>()}
|
||||||
|
|
||||||
<Show when=move || !other_prompt.get().is_empty()>
|
<Show when=move || !other_prompt.get().is_empty()>
|
||||||
<RadioOther
|
<RadioOther
|
||||||
checked=other_checked
|
checked=other_checked
|
||||||
name=data_member
|
name=data_member
|
||||||
disabled=disabled
|
disabled=disabled
|
||||||
value=other_value
|
value=other_value
|
||||||
on_change=move |_| other_checked.set(true)
|
on_change=move |_| other_checked.set(true)
|
||||||
placeholder=other_prompt
|
placeholder=other_prompt
|
||||||
dirty=dirty
|
dirty=dirty
|
||||||
/>
|
/>
|
||||||
</Show>
|
</Show>
|
||||||
</div>
|
</div>
|
||||||
<Show when=move || show_errors.get()>
|
<Show when=move || show_errors.get()>
|
||||||
<div class="text-red-600 text-sm mr-1.5 ml-1.5">
|
<div class="text-red-600 text-sm mr-1.5 ml-1.5">
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ use leptos::task::spawn_local;
|
|||||||
use leptos::web_sys::HtmlAnchorElement;
|
use leptos::web_sys::HtmlAnchorElement;
|
||||||
use leptos::wasm_bindgen::JsCast;
|
use leptos::wasm_bindgen::JsCast;
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
use crate::pages::api::get_comparisons_categorized;
|
|
||||||
use crate::utils::get_user_claims;
|
use crate::utils::get_user_claims;
|
||||||
|
|
||||||
/// # Get Student Info
|
/// # Get Student Info
|
||||||
@@ -363,8 +362,7 @@ pub fn HomePage() -> impl IntoView {
|
|||||||
</Row>
|
</Row>
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}}
|
}} <Row>
|
||||||
<Row>
|
|
||||||
<ActionButton on:click=pdf_button_click>"Get PDF"</ActionButton>
|
<ActionButton on:click=pdf_button_click>"Get PDF"</ActionButton>
|
||||||
</Row>
|
</Row>
|
||||||
</Suspense>
|
</Suspense>
|
||||||
|
|||||||
@@ -609,7 +609,7 @@ fn ScholarshipForm(
|
|||||||
items=vec![
|
items=vec![
|
||||||
"Write an essay describing your major/career direction. Include any abilities, interests, experiences, employment or clubs you have had that have affected your direction. If you are undecided, indicate why.",
|
"Write an essay describing your major/career direction. Include any abilities, interests, experiences, employment or clubs you have had that have affected your direction. If you are undecided, indicate why.",
|
||||||
"Why is community service important? How has it personally affected you and your goals and what role do you hope to play in it in the future?",
|
"Why is community service important? How has it personally affected you and your goals and what role do you hope to play in it in the future?",
|
||||||
"How has participation in sports been beneficial to your personal, academic, and emotional growth?"
|
"How has participation in sports been beneficial to your personal, academic, and emotional growth?",
|
||||||
]
|
]
|
||||||
.iter()
|
.iter()
|
||||||
.map(|prompt| prompt.to_string())
|
.map(|prompt| prompt.to_string())
|
||||||
|
|||||||
@@ -1,8 +1,5 @@
|
|||||||
use chrono::DateTime;
|
use crate::components::DashboardButton;
|
||||||
use crate::common::{DateInfo, DateRange};
|
|
||||||
use crate::components::{ActionButton, DashboardButton, DateList};
|
|
||||||
use leptos::prelude::*;
|
use leptos::prelude::*;
|
||||||
use crate::pages::api::{get_important_dates, CreateDates};
|
|
||||||
|
|
||||||
#[component]
|
#[component]
|
||||||
pub fn TestPage() -> impl IntoView {
|
pub fn TestPage() -> impl IntoView {
|
||||||
@@ -44,5 +41,5 @@ pub fn TestPage() -> impl IntoView {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
}
|
}.into_any()
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user