format and fix
continuous-integration/drone/push Build is passing Details

pull/81/head
maxime 1 year ago
parent f7f28ae08b
commit af7c7e6e0b

@ -12,12 +12,10 @@ body {
/* border : solid 1px #303030; */ /* border : solid 1px #303030; */
display: flex; display: flex;
flex-direction: column; flex-direction: column;
font-family: (--font-content); font-family: var(--font-content);
height: 100%; height: 100%;
} }
#body { #body {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
@ -38,14 +36,8 @@ body {
cursor: pointer; cursor: pointer;
} }
.listTactic { .set-button {
display: block;
}
.SetButton {
width: 80%; width: 80%;
margin-left: 5%; margin-left: 5%;
margin-top: 5%; margin-top: 5%;
} }

@ -4,6 +4,6 @@
--third-color: #303341; --third-color: #303341;
--accent-color: #ffa238; --accent-color: #ffa238;
--main-contrast-color: #e6edf3; --main-contrast-color: #e6edf3;
--font-title : Helvetica; --font-title: Helvetica;
--font-content : Helvetica; --font-content: Helvetica;
} }

@ -140,7 +140,7 @@ function TableData({ allTactics }: { allTactics: Tactic[] }) {
onClick={() => { onClick={() => {
location.pathname = "/tactic/" + tactic.id + "/edit" location.pathname = "/tactic/" + tactic.id + "/edit"
}}> }}>
{troncName(tactic.name, 25)} {truncateString(tactic.name, 25)}
</td> </td>
)) ))
i++ i++
@ -230,7 +230,7 @@ function SetButtonTeam({ teams }: { teams: Team[] }) {
} }
function ButtonTeam({ team }: { team: Team }) { function ButtonTeam({ team }: { team: Team }) {
const name = troncName(team.name, 20) const name = truncateString(team.name, 20)
return ( return (
<div> <div>
<div <div
@ -246,7 +246,7 @@ function ButtonTeam({ team }: { team: Team }) {
} }
function ButtonLastTactic({ tactic }: { tactic: Tactic }) { function ButtonLastTactic({ tactic }: { tactic: Tactic }) {
const name = troncName(tactic.name, 20) const name = truncateString(tactic.name, 20)
return ( return (
<div <div
id={"button" + tactic.id} id={"button" + tactic.id}
@ -259,7 +259,7 @@ function ButtonLastTactic({ tactic }: { tactic: Tactic }) {
) )
} }
function troncName(name: string, limit: number): string { function truncateString(name: string, limit: number): string {
if (name.length > limit) { if (name.length > limit) {
name = name.substring(0, limit) + "..." name = name.substring(0, limit) + "..."
} }

Loading…
Cancel
Save