This commit is contained in:
Elisee ADJIGUIDI 2023-06-28 18:06:58 +02:00
parent c5371353f8
commit 302413350f
4 changed files with 5 additions and 33 deletions

View File

@ -3,14 +3,14 @@
/* ::: :::::::: */ /* ::: :::::::: */
/* Rank.tsx :+: :+: :+: */ /* Rank.tsx :+: :+: :+: */
/* +:+ +:+ +:+ */ /* +:+ +:+ +:+ */
/* By: apommier <apommier@student.42.fr> +#+ +:+ +#+ */ /* By: sadjigui <sadjigui@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2023/06/09 08:49:24 by apommier #+# #+# */ /* 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 DefaultPicture from '../../assets/profile.jpg'
import api from '../../script/axiosApi.tsx'; import api from '../../script/axiosApi.tsx';
import {User} from "../../../interfaces.tsx" import {User} from "../../../interfaces.tsx"

View File

@ -1,7 +1,5 @@
// import React from "react" import React, { useState, useEffect } from "react";
import React, { useState, useEffect, useRef } from "react";
import Rank from './Rank.tsx' import Rank from './Rank.tsx'
import defaultpic from '../../assets/profile.jpg'
import api from '../../script/axiosApi.tsx'; import api from '../../script/axiosApi.tsx';
import {User} from "../../../interfaces.tsx" import {User} from "../../../interfaces.tsx"

View File

@ -54,12 +54,6 @@ const UserChat = styled.div `
} }
` `
const SideP = styled.p`
font-size: 14px;
color: lightgray;
margin-left: 15px;
`
//======================================================================================================== //========================================================================================================
//======================================================================================================== //========================================================================================================
// Logical part // Logical part
@ -238,10 +232,6 @@ function Chats(){
const closeSetting = () => setSetting(false); const closeSetting = () => setSetting(false);
const handleFriend = (event: { target: { value: React.SetStateAction<string>; }; }) => {
setFriend(event.target.value);
};
const handleAddFriend = async () => { const handleAddFriend = async () => {
try{ try{
const res = await api.post("/invite", {username: friend}) const res = await api.post("/invite", {username: friend})

View File

@ -6,21 +6,6 @@ import api from "../../script/axiosApi.tsx";
import React from "react"; import React from "react";
import {User} from "../../../interfaces.tsx" 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 { interface ModalGame {
handleClose: Function, handleClose: Function,
} }
@ -28,7 +13,6 @@ interface ModalGame {
const GameModal = ({ handleClose }: ModalGame) => { const GameModal = ({ handleClose }: ModalGame) => {
const [users, setUsers] = useState([]); const [users, setUsers] = useState([]);
const [selectedUser, setSelectedUser] = useState(''); const [selectedUser, setSelectedUser] = useState('');
const [channel, setChannel] = useState('');
useEffect(() => { useEffect(() => {
const fetchData = async () => { const fetchData = async () => {