Fix more clippy issues, implement forgot password
All checks were successful
Build Crate / build (push) Successful in 1m48s
All checks were successful
Build Crate / build (push) Successful in 1m48s
This commit is contained in:
@@ -16,13 +16,12 @@ cfg_if::cfg_if! {
|
||||
}
|
||||
|
||||
#[derive(Prop)]
|
||||
pub struct HeaderProps<'a> {
|
||||
pub struct HeaderProps {
|
||||
pub game: GameState,
|
||||
pub title: &'a str,
|
||||
}
|
||||
|
||||
#[component]
|
||||
pub fn Header<'a, G: Html>(cx: Scope<'a>, HeaderProps { game, title }: HeaderProps<'a>) -> View<G> {
|
||||
pub fn Header<'a, G: Html>(cx: Scope<'a>, props: HeaderProps) -> View<G> {
|
||||
// Get global state to get authentication info
|
||||
let global_state = Reactor::<G>::from_cx(cx).get_global_state::<AppStateRx>(cx);
|
||||
|
||||
@@ -63,7 +62,7 @@ pub fn Header<'a, G: Html>(cx: Scope<'a>, HeaderProps { game, title }: HeaderPro
|
||||
|
||||
// Title
|
||||
div(class = "text-gray-700 text-2xl font-semibold py-2") {
|
||||
"Pool Elo - Season 1"
|
||||
(props.game.to_string()) " - Season 1"
|
||||
}
|
||||
|
||||
// Login / register or user buttons
|
||||
|
||||
@@ -14,7 +14,6 @@ use sycamore::prelude::*;
|
||||
#[derive(Prop)]
|
||||
pub struct LayoutProps<'a, G: Html> {
|
||||
pub game: GameState,
|
||||
pub title: &'a str,
|
||||
pub children: Children<'a, G>,
|
||||
}
|
||||
|
||||
@@ -23,11 +22,7 @@ pub struct LayoutProps<'a, G: Html> {
|
||||
#[component]
|
||||
pub fn Layout<'a, G: Html>(
|
||||
cx: Scope<'a>,
|
||||
LayoutProps {
|
||||
game,
|
||||
title,
|
||||
children,
|
||||
}: LayoutProps<'a, G>,
|
||||
LayoutProps { game, children }: LayoutProps<'a, G>,
|
||||
) -> View<G> {
|
||||
let children = children.call(cx);
|
||||
|
||||
@@ -39,7 +34,7 @@ pub fn Layout<'a, G: Html>(
|
||||
|
||||
view! { cx,
|
||||
// Main page header, including login functionality
|
||||
Header(game = game, title = title)
|
||||
Header(game = game)
|
||||
|
||||
// Modals
|
||||
section(class = "flex-2") {
|
||||
|
||||
Reference in New Issue
Block a user