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 (
-
- logo -

- Welcome to WED Community. +

+ logo +

+ WED Communityにようこそ!

Learn WED + + コミュニティページ + +

{ + setgoodCount(goodcount + 1); + }} + > + + {goodcount} +

+ +

{ + setbadCount(badcount + 1); + }} + > + + {badcount} +

+ {data ? ( + <> + icon +

{data.login}

+ + ) : ( +

no data

+ )}
); diff --git a/src/NewPage.js b/src/NewPage.js new file mode 100644 index 0000000..e69de29 diff --git a/src/index.js b/src/index.js index f059a20..a797b0d 100644 --- a/src/index.js +++ b/src/index.js @@ -4,6 +4,7 @@ import { BrowserRouter, Route, Routes } from 'react-router-dom'; import './index.css'; import App from './App'; import reportWebVitals from './reportWebVitals'; +import NewPage from './NewPage'; const root = ReactDOM.createRoot(document.getElementById('root')); root.render( @@ -11,6 +12,7 @@ root.render( } /> + } /> diff --git a/src/newpage.js b/src/newpage.js new file mode 100644 index 0000000..37df8dd --- /dev/null +++ b/src/newpage.js @@ -0,0 +1,12 @@ +import React from "react"; + +function NewPage() { + return( +
+

コミュニティーページ

+ 10月のイベントについて +
+ ); +} + +export default NewPage; \ No newline at end of file diff --git a/tailwind.config.js b/tailwind.config.js index 7780c81..1cea45f 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -1,16 +1,15 @@ /** @type {import('tailwindcss').Config} */ module.exports = { - content: [ - "./src/**/*.{js,jsx}", - ], + content: ["./src/**/*.{js,jsx}"], theme: { colors: { - wed: '#D2D2C6', - 'wed-dark': '#6D695D', - }, - extend: { + wed: "#D2D2C6", + "wed-dark": "#6D695D", + "mediumpurple": "#9370db", + "aquamarine": "#7fffd4", + "navy": "#000080", }, + extend: {}, }, plugins: [], -} - +};