Skip to content

Commit

Permalink
Revert "removed more warnings, facebook should really fix facebook/cr…
Browse files Browse the repository at this point in the history
…eate-react-app#2453"

This reverts commit 32ef089.
  • Loading branch information
legendsayantan committed Apr 25, 2023
1 parent 32ef089 commit a0ff2f2
Show file tree
Hide file tree
Showing 16 changed files with 34 additions and 30 deletions.
6 changes: 3 additions & 3 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import Screenery from "./pages/Screenery";
import Autoreact from "./pages/Autoreact";
import Webmimic from "./pages/Webmimic";

const AppStates = {
var AppStates = {
home: 0,
articles: 1,
software: 2,
Expand All @@ -36,13 +36,13 @@ function App() {
window.removeEventListener('resize', handleWindowSizeChange);
}
}, []);
const footerStyle = {
var footerStyle = {
position: "absolute",
bottom: 0,
width: "100%",
height: "100px",
overflow: "hidden"
};
}
//states
const [x, setX] = React.useState(0)
const [y, setY] = React.useState(0)
Expand Down
2 changes: 1 addition & 1 deletion src/background/CircularGradient.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import React, {useRef, useState} from 'react';
import './CircularGradient.css';

const CircularGradient = (props) => {
Expand Down
5 changes: 3 additions & 2 deletions src/components/AllSoftwarePC.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@ import Software from "./Software";
import React from "react";
import "./SectionsForPC.css"
import PointedStar from "./PointedStar";
import {getCustomPages} from "../App";

function AllSoftwarePC({shown, loadCustomPage}) {
const flexStyle = {
var flexStyle = {
display: 'flex',
flexDirection: 'row',
justifyContent: 'center',
alignItems: 'center',
width: '100%',
height: '125px',
pointerEvents: 'inherit',
};
}
let allData = require('../data/software.json');
return (
<div style={{
Expand Down
4 changes: 2 additions & 2 deletions src/components/AppItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import React from 'react';
import "./AppItem.css"

const AppItem = ({info, onClick}) => {
const desc = {
var desc = {
margin: 0,
fontSize: '12px',
fontFamily: 'Consolas'
};
}
return (
<div className={'appitem'} onClick={onClick}>
<div style={{
Expand Down
2 changes: 1 addition & 1 deletion src/components/Article.css
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
.article-card_image {
width: auto;
height: 12vh;
margin: 0 10px;
margin: 0px 10px;
border-radius: 15px;
filter: invert(56%) sepia(87%) saturate(1000%) hue-rotate(352deg) brightness(103%) contrast(108%);
-webkit-mask-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 1)), to(rgba(0, 0, 0, 0)));
Expand Down
8 changes: 4 additions & 4 deletions src/components/Bubble.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React, {useRef} from 'react';
import React, {useEffect, useRef, useState} from 'react';
import './Bubble.css';

const Bubble = ({text, clickHandler, position, popped}) => {
// Define the style object for the bubble
const ref = useRef();
var ref = useRef()
const bubbleStyle = {
transform: `translate(${position.X}px, ${position.Y}px) rotate(${position.Rotate}deg)`,
borderRadius: '50%',
Expand All @@ -17,13 +17,13 @@ const Bubble = ({text, clickHandler, position, popped}) => {
alignItems: 'center',
marginRight: '25px',
};
const textStyle = {
var textStyle = {
textAlign: 'center',
color: "white",
fontFamily: 'cursive',
fontSize: '10px',
transform: `rotate(${-1 * position.Rotate}deg)`,
};
}

return (
<div ref={ref} onClick={clickHandler} className={popped ? 'pop' : 'spawn'}>
Expand Down
1 change: 1 addition & 0 deletions src/components/Popup.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from 'react';
import PropTypes from 'prop-types';
import "../pages/Pages.css"

const Popup = ({showInput = true, text = 'test', onClose, onContinue}) => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Software.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const Software = ({name, desc, imageUrl, scale, onClickHandler}) => {
<div className="software-card" onClick={onClickHandler}>
<div className="software-card-flex">
<img src={imageUrl} className="software-card_image"
style={{display: `${showimage ? "block" : "none"}`, transform: `scale(${scale})`}} alt={""}/>
style={{display: `${showimage ? "block" : "none"}`, transform: `scale(${scale})`}}/>
<h4 style={{
height: "25px",
margin: "10px",
Expand Down
2 changes: 1 addition & 1 deletion src/components/TypingAnimation.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const TypingAnimation = ({
}, speed);
return () => clearInterval(intervalId);
}, delay)
}, [text, speed, delay, onComplete]);
}, [text, speed]);

return (
<div>
Expand Down
2 changes: 1 addition & 1 deletion src/dev/previews.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import React, {useCallback} from 'react'
import {ComponentPreview, Previews} from '@react-buddy/ide-toolbox'
import {PaletteTree} from './palette'
import Homelink from "../header/Homelink";
Expand Down
2 changes: 1 addition & 1 deletion src/dev/useInitial.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {useState} from 'react'

export const useInitial = () => {
const [status] = useState({
const [status, setStatus] = useState({
loading: false,
error: false
})
Expand Down
3 changes: 2 additions & 1 deletion src/header/PopupMenus.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import {useState} from "react";
import {useRef, 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}) => {
Expand Down
11 changes: 6 additions & 5 deletions src/home/GameStage.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ 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=()=>{},onQuit,keypress,resetKey}) {
function GameStage({setPlatformSpeed=(i)=>{},onQuit,keypress,resetKey}) {
const allTexts = require('./scenes/headings.json')
const [level, setLevel] = useState(0);
const [guyClass, setGuyClass] = useState('');
Expand All @@ -40,15 +41,15 @@ function GameStage({setPlatformSpeed=()=>{},onQuit,keypress,resetKey}) {
setText(allTexts[level])
setShowText(false)
if([1,5].includes(level)){
setPlatformSpeed()
setPlatformSpeed(1.75)
}
setTimeout(()=>{
setShowText(true)
}, 1000)
setTimeout(()=>{
setPlatformSpeed()
setPlatformSpeed(0)
}, level===1? 3500 : 5000)
}, [allTexts, level, setPlatformSpeed]
}, [allTexts, level]
)
useEffect(()=> {
resetKey()
Expand All @@ -64,7 +65,7 @@ function GameStage({setPlatformSpeed=()=>{},onQuit,keypress,resetKey}) {
onQuit()
}
}
}, [allTexts.length, keypress, level, onQuit, resetKey, showToSkip])
}, [keypress,showToSkip])
return (<>
<div id={'game'} style={{
bottom:'0',
Expand Down
2 changes: 1 addition & 1 deletion src/home/Homepage.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function Homepage({shown, switchState, setPlatformSpeed}) {
setPressedKey(event.key)
break;
}
}, [gamePlay, switchState]);
}, [gamePlay,pressedKey]);
useEffect(() => {
document.addEventListener("keydown", key, false);
return () => {
Expand Down
2 changes: 1 addition & 1 deletion src/home/res/SquareGuy.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import React, {useEffect, useRef, useState} from 'react';
import './SquareGuy.css';

class SquareGuy extends React.Component {
Expand Down
10 changes: 5 additions & 5 deletions src/js/adb.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/* eslint-disable */
import Adb from './webadb'
import Adb from './webadb'

let adbInstance = null, device = null, webusb = null;
const AdbModes = {
var adbInstance = null, device = null, webusb = null;
var connectBtn, nameView, container;
var AdbModes = {
connect: 0,
loadApps: 1,
execute: 2,
disconnect: 3,
};
}
export let getAdbModes = () => {
return AdbModes
}
Expand Down

0 comments on commit a0ff2f2

Please sign in to comment.