diff --git a/traque-front/components/team/notification.jsx b/traque-front/components/team/notification.jsx index c7831a1..07d5fd1 100644 --- a/traque-front/components/team/notification.jsx +++ b/traque-front/components/team/notification.jsx @@ -39,11 +39,12 @@ export function Notification({ socket }) { success: "bg-green-500", warning: "bg-yellow-500" } - const classNames = 'fixed w-11/12 p-5 z-30 mx-auto inset-x-0 flex justify-center rounded-xl transition-all shadow-xl ' + (visible ? "top-5 " : "-translate-y-full "); + const classNames = 'fixed relative w-11/12 p-5 z-30 mx-auto inset-x-0 flex justify-center rounded-xl transition-all shadow-xl ' + (visible ? "top-5 " : "-translate-y-full "); return ( Object.keys(bgColorMap).map((key) => notification?.type == key &&
setVisible(false)}> +

x

{notification?.text}

)); diff --git a/traque-front/hook/useGame.jsx b/traque-front/hook/useGame.jsx index 5418ca3..a77b8f9 100644 --- a/traque-front/hook/useGame.jsx +++ b/traque-front/hook/useGame.jsx @@ -3,7 +3,6 @@ import { useSocket } from "@/context/socketContext"; import { useTeamConnexion } from "@/context/teamConnexionContext"; import { useTeamContext } from "@/context/teamContext"; -import { useEffect } from "react"; export default function useGame() { const { teamSocket } = useSocket();