From 302413350f47324c615e78a97fa60c941c0603b8 Mon Sep 17 00:00:00 2001 From: Elisee ADJIGUIDI Date: Wed, 28 Jun 2023 18:06:58 +0200 Subject: [PATCH] unused --- containers/react/src/components/Game/Rank.tsx | 6 +++--- .../react/src/components/Game/Ranking.tsx | 4 +--- .../react/src/components/Messages/Chats.tsx | 10 ---------- .../src/components/Messages/GameModal.tsx | 18 +----------------- 4 files changed, 5 insertions(+), 33 deletions(-) diff --git a/containers/react/src/components/Game/Rank.tsx b/containers/react/src/components/Game/Rank.tsx index df780134..af9f7bf4 100644 --- a/containers/react/src/components/Game/Rank.tsx +++ b/containers/react/src/components/Game/Rank.tsx @@ -3,14 +3,14 @@ /* ::: :::::::: */ /* Rank.tsx :+: :+: :+: */ /* +:+ +:+ +:+ */ -/* By: apommier +#+ +:+ +#+ */ +/* By: sadjigui +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/06/09 08:49:24 by apommier #+# #+# */ -/* Updated: 2023/06/28 17:39:43 by apommier ### ########.fr */ +/* Updated: 2023/06/28 17:55:55 by sadjigui ### ########.fr */ /* */ /* ************************************************************************** */ -import React, { useState, useEffect, useRef } from "react"; +import React, { useState, useEffect } from "react"; import DefaultPicture from '../../assets/profile.jpg' import api from '../../script/axiosApi.tsx'; import {User} from "../../../interfaces.tsx" diff --git a/containers/react/src/components/Game/Ranking.tsx b/containers/react/src/components/Game/Ranking.tsx index 0f651b13..95ed30e3 100644 --- a/containers/react/src/components/Game/Ranking.tsx +++ b/containers/react/src/components/Game/Ranking.tsx @@ -1,7 +1,5 @@ -// import React from "react" -import React, { useState, useEffect, useRef } from "react"; +import React, { useState, useEffect } from "react"; import Rank from './Rank.tsx' -import defaultpic from '../../assets/profile.jpg' import api from '../../script/axiosApi.tsx'; import {User} from "../../../interfaces.tsx" diff --git a/containers/react/src/components/Messages/Chats.tsx b/containers/react/src/components/Messages/Chats.tsx index 8661115a..53688e07 100644 --- a/containers/react/src/components/Messages/Chats.tsx +++ b/containers/react/src/components/Messages/Chats.tsx @@ -54,12 +54,6 @@ const UserChat = styled.div ` } ` -const SideP = styled.p` - font-size: 14px; - color: lightgray; - margin-left: 15px; -` - //======================================================================================================== //======================================================================================================== // Logical part @@ -238,10 +232,6 @@ function Chats(){ const closeSetting = () => setSetting(false); - const handleFriend = (event: { target: { value: React.SetStateAction; }; }) => { - setFriend(event.target.value); - }; - const handleAddFriend = async () => { try{ const res = await api.post("/invite", {username: friend}) diff --git a/containers/react/src/components/Messages/GameModal.tsx b/containers/react/src/components/Messages/GameModal.tsx index 263ad4b9..c3741332 100644 --- a/containers/react/src/components/Messages/GameModal.tsx +++ b/containers/react/src/components/Messages/GameModal.tsx @@ -6,21 +6,6 @@ import api from "../../script/axiosApi.tsx"; import React from "react"; import {User} from "../../../interfaces.tsx" -const dropIn = { - hidden: { y: "-100vh", opacity: 0 }, - visible: { - y: "0", - opacity: 1, - transition: { - duration: 0.3, - type: "spring", - damping: 100, - stiffness: 500, - }, - }, - exit: { y: "100vh", opacity: 0 }, -}; - interface ModalGame { handleClose: Function, } @@ -28,8 +13,7 @@ interface ModalGame { const GameModal = ({ handleClose }: ModalGame) => { const [users, setUsers] = useState([]); const [selectedUser, setSelectedUser] = useState(''); - const [channel, setChannel] = useState(''); - + useEffect(() => { const fetchData = async () => { try {