clean unused var
This commit is contained in:
parent
c5371353f8
commit
6f98aa90e5
@ -8,28 +8,12 @@ import api from "../../script/axiosApi.tsx";
|
||||
import React from "react";
|
||||
import {User, Conv} from "../../../interfaces.tsx"
|
||||
|
||||
const dropIn = {
|
||||
hidden:{y:"-100vh",
|
||||
opacity: 0,},
|
||||
visible:{y: "0",
|
||||
opacity: 0,
|
||||
transotion:{
|
||||
duration:0.1,
|
||||
type:"spring",
|
||||
damping: 100,
|
||||
stiffness: 500,
|
||||
}},
|
||||
exit:{y: "100vh",
|
||||
opacity: 0,},
|
||||
};
|
||||
|
||||
interface ModalProps {
|
||||
handleClose: Function,
|
||||
}
|
||||
|
||||
const Modal = ({handleClose}: ModalProps) => {
|
||||
const [selectTags, setSelectTag] = useState([{ id: 1, selectedOption: ''}]);
|
||||
const [selectedOptionArray, setSelectedOptionArray] = useState<string[]>([]);
|
||||
const [users, setUsers] = useState<User[]>([]);
|
||||
const [user, setUser] = useState<User>();
|
||||
const [convs, setConvs] = useState<Conv[]>([]);
|
||||
@ -118,8 +102,6 @@ const Modal = ({handleClose}: ModalProps) => {
|
||||
} catch(err) {
|
||||
console.log(err);
|
||||
}
|
||||
setSelectedOptionArray(selectedOptions);
|
||||
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
@ -139,7 +139,7 @@ const ModalSetting = ({ handleClose, convId, socket }: ModalSettingProps) => {
|
||||
const closeMuteAlert = () => setMuteAlert(false);
|
||||
|
||||
const handleMute = async (e: { key: string; }) => {
|
||||
if (e.key != "Enter")
|
||||
if (e.key !== "Enter")
|
||||
return;
|
||||
try {
|
||||
const ret = await api.post("/mute", { convId: convId, username: selectedUser, time: time })
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import '../../styles/Win_Loss.css'
|
||||
import { User, Matchlog } from "../../../interfaces.tsx"
|
||||
import React, { useState, useEffect, useRef } from "react";
|
||||
import React, { useState, useEffect} from "react";
|
||||
import { useParams } from 'react-router-dom';
|
||||
import api from '../../script/axiosApi.tsx';
|
||||
|
||||
@ -9,7 +9,6 @@ function WinLoss() {
|
||||
const [user, setUser] = useState<User>();
|
||||
const [history, setHistory] = useState([]);
|
||||
const [isLoading, setIsLoading] = useState(true);
|
||||
|
||||
const { username } = useParams();
|
||||
|
||||
useEffect(()=> {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
/* By: apommier <apommier@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2023/06/09 08:18:58 by apommier #+# #+# */
|
||||
/* Updated: 2023/06/28 17:50:52 by apommier ### ########.fr */
|
||||
/* Updated: 2023/06/28 17:59:49 by apommier ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@ -56,7 +56,6 @@ export default function Friend({currentUser}: UserProps)
|
||||
function getStatus(friend: User)
|
||||
{
|
||||
let status = friend.status
|
||||
let session =friend.sessionNumber
|
||||
let statusColor;
|
||||
|
||||
if (status === 0)
|
||||
|
||||
@ -18,7 +18,6 @@ function Social (){
|
||||
const tmpFriends = await api.get("/friends")
|
||||
const tmpUser = await api.get("/profile")
|
||||
const tmpInv = await api.get("/inviteRequest")
|
||||
const pic = await api.post("/getPicture", {username: tmpUser.data.username})
|
||||
|
||||
setInvite(tmpInv.data);
|
||||
setUser(tmpUser.data);
|
||||
|
||||
@ -29,7 +29,6 @@ const qrCode = new QRCodeStyling({
|
||||
|
||||
function QrCode () {
|
||||
const ref = useRef<HTMLDivElement>(null);
|
||||
const [user, setUser] = useState(false);
|
||||
const [url, setUrl] = useState("");
|
||||
const [secret, setSecret] = useState(false);
|
||||
const [code, setCode] = useState('');
|
||||
@ -43,7 +42,6 @@ function QrCode () {
|
||||
const getUser = async ()=>{
|
||||
try{
|
||||
const tmpUser = await api.get("/profile");
|
||||
setUser(tmpUser.data);
|
||||
if (tmpUser.data.otp_verified)
|
||||
{
|
||||
setActivated(true);
|
||||
|
||||
@ -11,7 +11,6 @@ interface GameProps {
|
||||
function DrawCanvas(option: number, gameParam: GameProps) {
|
||||
|
||||
const superpowerModifier = option & 1; // Retrieves the superpower modifier
|
||||
const obstacleModifier = (option >> 1) & 1; // Retrieves the obstacle modifier
|
||||
const speedModifier = (option >> 2) & 1; // Retrieves the speed modifier
|
||||
|
||||
function launchGame()
|
||||
@ -48,7 +47,6 @@ function DrawCanvas(option: number, gameParam: GameProps) {
|
||||
|
||||
//general canvas
|
||||
let running = true;
|
||||
const scale = window.devicePixelRatio;
|
||||
canvas.width = canvas.offsetWidth;
|
||||
canvas.height = canvas.offsetHeight;
|
||||
|
||||
|
||||
@ -1,11 +1,6 @@
|
||||
|
||||
import axios from 'axios';
|
||||
|
||||
function getToken() {
|
||||
const token = localStorage.getItem('token');
|
||||
return token;
|
||||
}
|
||||
|
||||
let api = axios.create({
|
||||
baseURL: 'http://' + process.env.REACT_APP_BASE_URL + '/api',
|
||||
headers: {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user