rebased the branch + continue to translate html.twig to react
continuous-integration/drone/push Build is failing Details

pull/84/head
Maël DAIM 1 year ago
parent d78b51c015
commit edf9e9aa1c

@ -22,11 +22,32 @@ interface Member{
}
export default function TeamPanel({isCoach}: {isCoach: boolean}){
return <p>prout ({isCoach ? "vrai" : "faux"})</p>
export default function TeamPanel({isCoach, team}: {isCoach: boolean, team: Team }){
return (
<div>
<TeamDisplay name={isCoach ? "vrai je suis coach" : "non"}/>
</div>
)
}
function TeamDisplay({name,picture,mainColor,secondColor}: {name: string,picture : string,mainColor}) {
return (
<div>
<h1>{name}</h1>
<img src={picture} alt="Logo d'équipe" class="logo"/>
</div>
<div id="colors">
<Color/>
</div>
)
}
function Color({color}: {color : string}){
return(
<div className="color"><p>Couleur principale : </p>
<div className="square" style="background-color:{color}"></div>
</div>
)
}

@ -139,7 +139,12 @@ class TeamController {
}
else{
$role = $this->model->isCoach($id,$session->getAccount()->getEmail());
return ViewHttpResponse::react('views/TeamPanel.tsx', ['team' => ["a" => "b"], 'isCoach' => $role]);
return ViewHttpResponse::react('views/TeamPanel.tsx', [
'team' => [
"info" => [
"id" => 1
]
], 'isCoach' => $role]);
}
}

Loading…
Cancel
Save