From 32ef0898e8741c2a8a39f8bdc8b7098258482c68 Mon Sep 17 00:00:00 2001 From: legendsayantan Date: Tue, 25 Apr 2023 17:05:14 +0530 Subject: [PATCH] removed more warnings, facebook should really fix https://github.com/facebook/create-react-app/issues/2453 --- src/App.js | 6 +++--- src/background/CircularGradient.js | 2 +- src/components/AllSoftwarePC.js | 5 ++--- src/components/AppItem.js | 4 ++-- src/components/Article.css | 2 +- src/components/Bubble.js | 8 ++++---- src/components/Popup.js | 1 - src/components/Software.js | 2 +- src/components/TypingAnimation.js | 2 +- src/dev/previews.jsx | 2 +- src/dev/useInitial.js | 2 +- src/header/PopupMenus.js | 3 +-- src/home/GameStage.js | 11 +++++------ src/home/Homepage.js | 2 +- src/home/res/SquareGuy.js | 2 +- src/js/adb.js | 10 +++++----- 16 files changed, 30 insertions(+), 34 deletions(-) diff --git a/src/App.js b/src/App.js index da81bf6..a918d96 100644 --- a/src/App.js +++ b/src/App.js @@ -16,7 +16,7 @@ import Screenery from "./pages/Screenery"; import Autoreact from "./pages/Autoreact"; import Webmimic from "./pages/Webmimic"; -var AppStates = { +const AppStates = { home: 0, articles: 1, software: 2, @@ -36,13 +36,13 @@ function App() { window.removeEventListener('resize', handleWindowSizeChange); } }, []); - var footerStyle = { + const footerStyle = { position: "absolute", bottom: 0, width: "100%", height: "100px", overflow: "hidden" - } + }; //states const [x, setX] = React.useState(0) const [y, setY] = React.useState(0) diff --git a/src/background/CircularGradient.js b/src/background/CircularGradient.js index c8fd624..9003d9f 100644 --- a/src/background/CircularGradient.js +++ b/src/background/CircularGradient.js @@ -1,4 +1,4 @@ -import React, {useRef, useState} from 'react'; +import React from 'react'; import './CircularGradient.css'; const CircularGradient = (props) => { diff --git a/src/components/AllSoftwarePC.js b/src/components/AllSoftwarePC.js index a010075..2153b02 100644 --- a/src/components/AllSoftwarePC.js +++ b/src/components/AllSoftwarePC.js @@ -2,10 +2,9 @@ import Software from "./Software"; import React from "react"; import "./SectionsForPC.css" import PointedStar from "./PointedStar"; -import {getCustomPages} from "../App"; function AllSoftwarePC({shown, loadCustomPage}) { - var flexStyle = { + const flexStyle = { display: 'flex', flexDirection: 'row', justifyContent: 'center', @@ -13,7 +12,7 @@ function AllSoftwarePC({shown, loadCustomPage}) { width: '100%', height: '125px', pointerEvents: 'inherit', - } + }; let allData = require('../data/software.json'); return (
{ - var desc = { + const desc = { margin: 0, fontSize: '12px', fontFamily: 'Consolas' - } + }; return (
{ // Define the style object for the bubble - var ref = useRef() + const ref = useRef(); const bubbleStyle = { transform: `translate(${position.X}px, ${position.Y}px) rotate(${position.Rotate}deg)`, borderRadius: '50%', @@ -17,13 +17,13 @@ const Bubble = ({text, clickHandler, position, popped}) => { alignItems: 'center', marginRight: '25px', }; - var textStyle = { + const textStyle = { textAlign: 'center', color: "white", fontFamily: 'cursive', fontSize: '10px', transform: `rotate(${-1 * position.Rotate}deg)`, - } + }; return (
diff --git a/src/components/Popup.js b/src/components/Popup.js index ff9a447..b477b7f 100644 --- a/src/components/Popup.js +++ b/src/components/Popup.js @@ -1,5 +1,4 @@ import React from 'react'; -import PropTypes from 'prop-types'; import "../pages/Pages.css" const Popup = ({showInput = true, text = 'test', onClose, onContinue}) => { diff --git a/src/components/Software.js b/src/components/Software.js index 605c74b..f8c2671 100644 --- a/src/components/Software.js +++ b/src/components/Software.js @@ -7,7 +7,7 @@ const Software = ({name, desc, imageUrl, scale, onClickHandler}) => {
+ style={{display: `${showimage ? "block" : "none"}`, transform: `scale(${scale})`}} alt={""}/>

clearInterval(intervalId); }, delay) - }, [text, speed]); + }, [text, speed, delay, onComplete]); return (
diff --git a/src/dev/previews.jsx b/src/dev/previews.jsx index 82b5f4d..fcf8fd4 100644 --- a/src/dev/previews.jsx +++ b/src/dev/previews.jsx @@ -1,4 +1,4 @@ -import React, {useCallback} from 'react' +import React from 'react' import {ComponentPreview, Previews} from '@react-buddy/ide-toolbox' import {PaletteTree} from './palette' import Homelink from "../header/Homelink"; diff --git a/src/dev/useInitial.js b/src/dev/useInitial.js index 203f394..e8fc981 100644 --- a/src/dev/useInitial.js +++ b/src/dev/useInitial.js @@ -1,7 +1,7 @@ import {useState} from 'react' export const useInitial = () => { - const [status, setStatus] = useState({ + const [status] = useState({ loading: false, error: false }) diff --git a/src/header/PopupMenus.js b/src/header/PopupMenus.js index 66b8d4d..a215bfa 100644 --- a/src/header/PopupMenus.js +++ b/src/header/PopupMenus.js @@ -1,8 +1,7 @@ -import {useRef, useState} from "react"; +import {useState} from "react"; import Menu from "./Menu"; import Bubble from "../components/Bubble"; import "./Header.css" -import app, {getAppStates} from "../App"; import React from "react"; const PopupMenus = ({mobile, articles, software}) => { diff --git a/src/home/GameStage.js b/src/home/GameStage.js index be0950d..a7d2f84 100644 --- a/src/home/GameStage.js +++ b/src/home/GameStage.js @@ -18,9 +18,8 @@ import AndroidLogo from "./res/AndroidLogo"; import MoreLangs from "./res/MoreLangs"; import WebFrameworks from "./res/WebFrameworks"; import GitHubLogo from "./res/GitHubLogo"; -import allTexts from "./scenes/headings.json"; -function GameStage({setPlatformSpeed=(i)=>{},onQuit,keypress,resetKey}) { +function GameStage({setPlatformSpeed=()=>{},onQuit,keypress,resetKey}) { const allTexts = require('./scenes/headings.json') const [level, setLevel] = useState(0); const [guyClass, setGuyClass] = useState(''); @@ -41,15 +40,15 @@ function GameStage({setPlatformSpeed=(i)=>{},onQuit,keypress,resetKey}) { setText(allTexts[level]) setShowText(false) if([1,5].includes(level)){ - setPlatformSpeed(1.75) + setPlatformSpeed() } setTimeout(()=>{ setShowText(true) }, 1000) setTimeout(()=>{ - setPlatformSpeed(0) + setPlatformSpeed() }, level===1? 3500 : 5000) - }, [allTexts, level] + }, [allTexts, level, setPlatformSpeed] ) useEffect(()=> { resetKey() @@ -65,7 +64,7 @@ function GameStage({setPlatformSpeed=(i)=>{},onQuit,keypress,resetKey}) { onQuit() } } - }, [keypress,showToSkip]) + }, [allTexts.length, keypress, level, onQuit, resetKey, showToSkip]) return (<>
{ document.addEventListener("keydown", key, false); return () => { diff --git a/src/home/res/SquareGuy.js b/src/home/res/SquareGuy.js index 4f9ff94..0382df9 100644 --- a/src/home/res/SquareGuy.js +++ b/src/home/res/SquareGuy.js @@ -1,4 +1,4 @@ -import React, {useEffect, useRef, useState} from 'react'; +import React from 'react'; import './SquareGuy.css'; class SquareGuy extends React.Component { diff --git a/src/js/adb.js b/src/js/adb.js index 65cf2d4..6aac4b6 100644 --- a/src/js/adb.js +++ b/src/js/adb.js @@ -1,13 +1,13 @@ -import Adb from './webadb' +/* eslint-disable */ +import Adb from './webadb' -var adbInstance = null, device = null, webusb = null; -var connectBtn, nameView, container; -var AdbModes = { +let adbInstance = null, device = null, webusb = null; +const AdbModes = { connect: 0, loadApps: 1, execute: 2, disconnect: 3, -} +}; export let getAdbModes = () => { return AdbModes }