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; */
display: flex;
flex-direction: column;
font-family: (--font-content);
font-family: var(--font-content);
height: 100%;
}
#body {
display: flex;
flex-direction: row;
@ -38,14 +36,8 @@ body {
cursor: pointer;
}
.listTactic {
display: block;
}
.SetButton {
.set-button {
width: 80%;
margin-left: 5%;
margin-top: 5%;
}

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

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

Loading…
Cancel
Save