From 5407d3fcb736c7a7563c848bd26a0d72c4409361 Mon Sep 17 00:00:00 2001 From: DahmaneYanis Date: Mon, 8 Jan 2024 16:45:59 +0100 Subject: [PATCH] format --- front/components/arrows/BendableArrow.tsx | 31 ++++++++-------- front/style/home/titre.css | 44 +++++++++++------------ front/views/Home.tsx | 2 +- src/Core/Gateway/TeamGateway.php | 2 +- src/Core/Model/TeamModel.php | 2 +- 5 files changed, 39 insertions(+), 42 deletions(-) diff --git a/front/components/arrows/BendableArrow.tsx b/front/components/arrows/BendableArrow.tsx index 6ecdb44..b8f0f19 100644 --- a/front/components/arrows/BendableArrow.tsx +++ b/front/components/arrows/BendableArrow.tsx @@ -116,23 +116,26 @@ export default function BendableArrow({ const styleWidth = style?.width ?? ArrowStyleDefaults.width - const computeInternalSegments = useCallback((segments: Segment[]) => { - return segments.map((segment, idx) => { - if (idx == 0) { + const computeInternalSegments = useCallback( + (segments: Segment[]) => { + return segments.map((segment, idx) => { + if (idx == 0) { + return { + start: startPos, + controlPoint: segment.controlPoint ?? null, + end: segment.next, + } + } + const start = segments[idx - 1].next return { - start: startPos, + start, controlPoint: segment.controlPoint ?? null, end: segment.next, } - } - const start = segments[idx - 1].next - return { - start, - controlPoint: segment.controlPoint ?? null, - end: segment.next, - } - }) - }, [segments, startPos]) + }) + }, + [segments, startPos], + ) // Cache the segments so that when the user is changing the segments (it moves an ArrowPoint), // it does not unwind to this arrow's component parent until validated. @@ -151,8 +154,6 @@ export default function BendableArrow({ const headRef = useRef(null) const tailRef = useRef(null) - - /** * Computes and return the segments edition points * @param parentBase diff --git a/front/style/home/titre.css b/front/style/home/titre.css index e4358ff..176f3ef 100644 --- a/front/style/home/titre.css +++ b/front/style/home/titre.css @@ -1,35 +1,33 @@ - #main { - margin-left : 10%; + margin-left: 10%; margin-right: 10%; - border : solid 2px purple; + border: solid 2px purple; display: flex; flex-direction: column; - font-family: Helvetica,; + font-family: Helvetica; } .new { border-radius: 100%; } -#header { +#header { text-align: center; background-color: green; - margin : 0px; + margin: 0px; } #body { display: flex; flex-direction: row; - border : solid 10px violet; - margin:0px - } + border: solid 10px violet; + margin: 0px; +} #personal-space { background-color: orange; display: flex; flex-direction: column; - } #sideMenu { @@ -42,46 +40,44 @@ #sideMenu h2 { display: inline-block; - margin-right : 5%; + margin-right: 5%; } .titreSideMenu { border-bottom: black solid 2px; width: 95%; - } #sideMenu .title { font-size: 13px; font-weight: bold; - color : #FFFFFF; + color: #ffffff; letter-spacing: 1px; text-transform: uppercase; background-color: black; - padding : 1.5%; + padding: 1.5%; margin-bottom: 0px; } #bodyPersonalSpace { width: 95%; - border : 1px red solid; + border: 1px red solid; align-self: center; } -#bodyPersonalSpace table{ +#bodyPersonalSpace table { width: 100%; - border-collapse : separate; - border-spacing : 1em; + border-collapse: separate; + border-spacing: 1em; } td { - border : 3px solid black; - padding-bottom : 1%; - padding-top : 1%; + border: 3px solid black; + padding-bottom: 1%; + padding-top: 1%; margin: 80px; - text-align: center; + text-align: center; } td:hover { background-color: red; - -} \ No newline at end of file +} diff --git a/front/views/Home.tsx b/front/views/Home.tsx index d44571d..9d521e3 100644 --- a/front/views/Home.tsx +++ b/front/views/Home.tsx @@ -42,7 +42,7 @@ export default function Home({ } /** - * + * * @param param0 username * @returns Header */ diff --git a/src/Core/Gateway/TeamGateway.php b/src/Core/Gateway/TeamGateway.php index c5cc115..3df6573 100644 --- a/src/Core/Gateway/TeamGateway.php +++ b/src/Core/Gateway/TeamGateway.php @@ -90,5 +90,5 @@ class TeamGateway { public function getAll(int $user): array { return $this->con->fetch("SELECT * FROM Team", []); } - + } diff --git a/src/Core/Model/TeamModel.php b/src/Core/Model/TeamModel.php index 3d5ade4..a5ba84b 100644 --- a/src/Core/Model/TeamModel.php +++ b/src/Core/Model/TeamModel.php @@ -85,7 +85,7 @@ class TeamModel { * @param integer $user * @return array> */ - public function getAll(int $user) : array { + public function getAll(int $user): array { return $this->teams->getAll($user); }