diff --git a/front/views/Home.tsx b/front/views/Home.tsx
index 8be885d..cc758ca 100644
--- a/front/views/Home.tsx
+++ b/front/views/Home.tsx
@@ -1,8 +1,8 @@
import "../style/home/home.css"
// 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 {
id: number
@@ -138,7 +138,7 @@ function TableData({ allTactics }: { allTactics: Tactic[] }) {
key={tactic.id}
className="data"
onClick={() => {
- location.pathname = "/tactic/" + tactic.id + "/edit"
+ location.pathname = BASE + "/tactic/" + tactic.id + "/edit"
}}>
{truncateString(tactic.name, 25)}
@@ -177,21 +177,13 @@ function BodyPersonalSpace({ allTactics }: { allTactics: Tactic[] }) {
}
function Team({ teams }: { teams: Team[] }) {
- const listTeam = teams.map((team, rowIndex) => (
-
- {team.name}
-
-
- ))
return (
Mes équipes
@@ -208,7 +200,7 @@ function Tactic({ lastTactics }: { lastTactics: Tactic[] }) {
@@ -237,7 +229,7 @@ function ButtonTeam({ team }: { team: Team }) {
id={"button-team" + team.id}
className="button-side-menu data"
onClick={() => {
- location.pathname = "/team/" + team.id
+ location.pathname = BASE + "/team/" + team.id
}}>
{name}
@@ -252,7 +244,7 @@ function ButtonLastTactic({ tactic }: { tactic: Tactic }) {
id={"button" + tactic.id}
className="button-side-menu data"
onClick={() => {
- location.pathname = "/tactic/" + tactic.id + "/edit"
+ location.pathname = BASE + "/tactic/" + tactic.id + "/edit"
}}>
{name}
diff --git a/front/views/template/Header.tsx b/front/views/template/Header.tsx
index 7129153..3c8c6e6 100644
--- a/front/views/template/Header.tsx
+++ b/front/views/template/Header.tsx
@@ -1,3 +1,5 @@
+import {BASE} from "../../Constants";
+
/**
*
* @param param0 username
@@ -25,7 +27,7 @@ export function Header({ username }: { username: string }) {
id="img-account"
src="account.svg"
onClick={() => {
- location.pathname = "/settings"
+ location.pathname = BASE + "/settings"
}}
/>
{username}