diff --git a/.codesandbox/tasks.json b/.codesandbox/tasks.json new file mode 100644 index 0000000..347b35a --- /dev/null +++ b/.codesandbox/tasks.json @@ -0,0 +1,33 @@ +{ + // These tasks will run in order when initializing your CodeSandbox project. + "setupTasks": [ + { + "command": "yarn install", + "name": "Install Dependencies" + } + ], + + // These tasks can be run from CodeSandbox. Running one will open a log in the app. + "tasks": { + "start": { + "name": "start", + "command": "yarn start", + "runAtStart": true + }, + "build": { + "name": "build", + "command": "yarn build", + "runAtStart": false + }, + "test": { + "name": "test", + "command": "yarn test", + "runAtStart": false + }, + "eject": { + "name": "eject", + "command": "yarn eject", + "runAtStart": false + } + } +} diff --git a/src/App.css b/src/App.css index 70e8f87..f0625c3 100644 --- a/src/App.css +++ b/src/App.css @@ -3,7 +3,7 @@ } .App-logo { - height: 40vmin; + height: 20vmin; pointer-events: none; } diff --git a/src/App.js b/src/App.js index 8653aec..2aa473d 100644 --- a/src/App.js +++ b/src/App.js @@ -1,22 +1,72 @@ -import logo from './logo.svg'; -import './App.css'; +import logo from "./logo.svg"; +import "./App.css"; +import { useState } from "react"; +import { useEffect } from "react"; function App() { + let [goodcount, setgoodCount] = useState(0); + let [badcount, setbadCount] = useState(0); + const [data, setData] = useState(undefined); + + useEffect(() => { + fetch("https://api.github.com/users/IsogaiEito") + .then((res) => res.json()) + .then((json) => setData(json)); + }, []); + return (
- Welcome to
+ {
+ setgoodCount(goodcount + 1);
+ }}
+ >
+
+ {goodcount}
+ {
+ setbadCount(badcount + 1);
+ }}
+ >
+
+ {badcount}
+ {data.login} no dataWED
Community.
+ WED
Communityにようこそ!