diff --git a/src/App.js b/src/App.js index a918d96..da81bf6 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"; -const AppStates = { +var AppStates = { home: 0, articles: 1, software: 2, @@ -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) diff --git a/src/background/CircularGradient.js b/src/background/CircularGradient.js index 9003d9f..c8fd624 100644 --- a/src/background/CircularGradient.js +++ b/src/background/CircularGradient.js @@ -1,4 +1,4 @@ -import React from 'react'; +import React, {useRef, useState} from 'react'; import './CircularGradient.css'; const CircularGradient = (props) => { diff --git a/src/components/AllSoftwarePC.js b/src/components/AllSoftwarePC.js index 2153b02..a010075 100644 --- a/src/components/AllSoftwarePC.js +++ b/src/components/AllSoftwarePC.js @@ -2,9 +2,10 @@ 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', @@ -12,7 +13,7 @@ function AllSoftwarePC({shown, loadCustomPage}) { width: '100%', height: '125px', pointerEvents: 'inherit', - }; + } let allData = require('../data/software.json'); return (
{ - const desc = { + var desc = { margin: 0, fontSize: '12px', fontFamily: 'Consolas' - }; + } return (
{ // 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%', @@ -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 (
diff --git a/src/components/Popup.js b/src/components/Popup.js index b477b7f..ff9a447 100644 --- a/src/components/Popup.js +++ b/src/components/Popup.js @@ -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}) => { diff --git a/src/components/Software.js b/src/components/Software.js index f8c2671..605c74b 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})`}}/>

clearInterval(intervalId); }, delay) - }, [text, speed, delay, onComplete]); + }, [text, speed]); return (
diff --git a/src/dev/previews.jsx b/src/dev/previews.jsx index fcf8fd4..82b5f4d 100644 --- a/src/dev/previews.jsx +++ b/src/dev/previews.jsx @@ -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"; diff --git a/src/dev/useInitial.js b/src/dev/useInitial.js index e8fc981..203f394 100644 --- a/src/dev/useInitial.js +++ b/src/dev/useInitial.js @@ -1,7 +1,7 @@ import {useState} from 'react' export const useInitial = () => { - const [status] = useState({ + const [status, setStatus] = useState({ loading: false, error: false }) diff --git a/src/header/PopupMenus.js b/src/header/PopupMenus.js index a215bfa..66b8d4d 100644 --- a/src/header/PopupMenus.js +++ b/src/header/PopupMenus.js @@ -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}) => { diff --git a/src/home/GameStage.js b/src/home/GameStage.js index a7d2f84..be0950d 100644 --- a/src/home/GameStage.js +++ b/src/home/GameStage.js @@ -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(''); @@ -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() @@ -64,7 +65,7 @@ function GameStage({setPlatformSpeed=()=>{},onQuit,keypress,resetKey}) { onQuit() } } - }, [allTexts.length, keypress, level, onQuit, resetKey, showToSkip]) + }, [keypress,showToSkip]) return (<>
{ document.addEventListener("keydown", key, false); return () => { diff --git a/src/home/res/SquareGuy.js b/src/home/res/SquareGuy.js index 0382df9..4f9ff94 100644 --- a/src/home/res/SquareGuy.js +++ b/src/home/res/SquareGuy.js @@ -1,4 +1,4 @@ -import React from 'react'; +import React, {useEffect, useRef, useState} from 'react'; import './SquareGuy.css'; class SquareGuy extends React.Component { diff --git a/src/js/adb.js b/src/js/adb.js index 6aac4b6..65cf2d4 100644 --- a/src/js/adb.js +++ b/src/js/adb.js @@ -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 }