fix bases
continuous-integration/drone/push Build is passing Details

pull/92/head
maxime 1 year ago
parent d6876ac033
commit ce3570e515

@ -1,8 +1,8 @@
import "../style/home/home.css" import "../style/home/home.css"
// import AccountSvg from "../assets/account.svg?react" // import AccountSvg from "../assets/account.svg?react"
import { CSSProperties, useRef } from "react"
import {Header} from "./template/Header" import {Header} from "./template/Header"
import {BASE} from "../Constants";
interface Tactic { interface Tactic {
id: number id: number
@ -138,7 +138,7 @@ function TableData({ allTactics }: { allTactics: Tactic[] }) {
key={tactic.id} key={tactic.id}
className="data" className="data"
onClick={() => { onClick={() => {
location.pathname = "/tactic/" + tactic.id + "/edit" location.pathname = BASE + "/tactic/" + tactic.id + "/edit"
}}> }}>
{truncateString(tactic.name, 25)} {truncateString(tactic.name, 25)}
</td> </td>
@ -177,21 +177,13 @@ function BodyPersonalSpace({ allTactics }: { allTactics: Tactic[] }) {
} }
function Team({ teams }: { teams: Team[] }) { function Team({ teams }: { teams: Team[] }) {
const listTeam = teams.map((team, rowIndex) => (
<li key={"team" + rowIndex}>
{team.name}
<button onClick={() => (location.pathname = "/team/" + team.id)}>
open
</button>
</li>
))
return ( return (
<div id="teams"> <div id="teams">
<div className="titre-side-menu"> <div className="titre-side-menu">
<h2 className="title">Mes équipes</h2> <h2 className="title">Mes équipes</h2>
<button <button
className="new" className="new"
onClick={() => (location.pathname = "/team/new")}> onClick={() => (location.pathname = BASE + "/team/new")}>
+ +
</button> </button>
</div> </div>
@ -208,7 +200,7 @@ function Tactic({ lastTactics }: { lastTactics: Tactic[] }) {
<button <button
className="new" className="new"
id="create-tactic" id="create-tactic"
onClick={() => (location.pathname = "/tactic/new")}> onClick={() => (location.pathname = BASE + "/tactic/new")}>
+ +
</button> </button>
</div> </div>
@ -237,7 +229,7 @@ function ButtonTeam({ team }: { team: Team }) {
id={"button-team" + team.id} id={"button-team" + team.id}
className="button-side-menu data" className="button-side-menu data"
onClick={() => { onClick={() => {
location.pathname = "/team/" + team.id location.pathname = BASE + "/team/" + team.id
}}> }}>
{name} {name}
</div> </div>
@ -252,7 +244,7 @@ function ButtonLastTactic({ tactic }: { tactic: Tactic }) {
id={"button" + tactic.id} id={"button" + tactic.id}
className="button-side-menu data" className="button-side-menu data"
onClick={() => { onClick={() => {
location.pathname = "/tactic/" + tactic.id + "/edit" location.pathname = BASE + "/tactic/" + tactic.id + "/edit"
}}> }}>
{name} {name}
</div> </div>

@ -1,3 +1,5 @@
import {BASE} from "../../Constants";
/** /**
* *
* @param param0 username * @param param0 username
@ -25,7 +27,7 @@ export function Header({ username }: { username: string }) {
id="img-account" id="img-account"
src="account.svg" src="account.svg"
onClick={() => { onClick={() => {
location.pathname = "/settings" location.pathname = BASE + "/settings"
}} }}
/> />
<p id="username">{username}</p> <p id="username">{username}</p>

Loading…
Cancel
Save