|
|
|
|
@ -25,7 +25,6 @@ pub struct TransactionsPageState {
|
|
|
|
|
#[auto_scope]
|
|
|
|
|
fn transactions_page<G: Html>(cx: Scope, state: &TransactionsPageStateRx) -> View<G> {
|
|
|
|
|
let global_state = Reactor::<G>::from_cx(cx).get_global_state::<AppStateRx>(cx);
|
|
|
|
|
let dark_mode = &global_state.dark_mode;
|
|
|
|
|
|
|
|
|
|
let expand = create_signal(cx, false);
|
|
|
|
|
let filter_expand = BaseButtonStateRx {
|
|
|
|
|
@ -73,33 +72,41 @@ fn transactions_page<G: Html>(cx: Scope, state: &TransactionsPageStateRx) -> Vie
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
let dark_mode_class = create_memo(cx, || {
|
|
|
|
|
if *global_state.dark_mode.get() {
|
|
|
|
|
"dark"
|
|
|
|
|
} else {
|
|
|
|
|
""
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
view! {cx,
|
|
|
|
|
main (class=if *dark_mode.get() { "dark" } else { "" }) {
|
|
|
|
|
div (class="bg-slate-200 dark:bg-slate-700 text-slate-700 dark:text-slate-100 font-sans") {
|
|
|
|
|
main (class=format!("{} flex flex-1", dark_mode_class)) {
|
|
|
|
|
div (class="flex-1 font-sans bg-slate-200 text-slate-700 dark:bg-slate-700 dark:text-slate-100") {
|
|
|
|
|
TheHeader()
|
|
|
|
|
MainContentContainer(useless_prop=1) {
|
|
|
|
|
a (class="hover:underline", href="/transactions") {
|
|
|
|
|
h1 (
|
|
|
|
|
class="text-center text-lg"
|
|
|
|
|
) {
|
|
|
|
|
"Insider Transactions published by the AMF"
|
|
|
|
|
}
|
|
|
|
|
MainContentContainer(useless_prop=1) {
|
|
|
|
|
a (class="hover:underline", href="/transactions") {
|
|
|
|
|
h1 (
|
|
|
|
|
class="text-lg text-center"
|
|
|
|
|
) {
|
|
|
|
|
"Insider Transactions published by the AMF"
|
|
|
|
|
}
|
|
|
|
|
BaseButton(filter_expand)
|
|
|
|
|
div (id="filters",
|
|
|
|
|
class=format!("p-2 border rounded-lg border-slate-200 dark:border-slate-800 bg-slate-200 dark:bg-slate-700 transition-all ease-in {}",
|
|
|
|
|
if *expand.get() { "h-40 visible" } else { "h-0 collapse" },
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
BaseButton(filter_expand)
|
|
|
|
|
div (id="filters",
|
|
|
|
|
class=format!("p-2 border rounded-lg border-slate-200 dark:border-slate-800 bg-slate-200 dark:bg-slate-700 transition-all ease-in {}",
|
|
|
|
|
if *expand.get() { "h-40 visible" } else { "h-0 collapse" },
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
{
|
|
|
|
|
div (class="w-80") {
|
|
|
|
|
p () {"Search for a company:"}
|
|
|
|
|
BaseAsyncSelect(async_select_prop)
|
|
|
|
|
BaseButton(search_button)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
PaginatedTable(paginated_table_state)
|
|
|
|
|
}
|
|
|
|
|
PaginatedTable(paginated_table_state)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|