From 5685886585e131340fa8d0db0b807fe0c5be7ca6 Mon Sep 17 00:00:00 2001 From: work Date: Sat, 19 Oct 2024 05:42:50 +0000 Subject: [PATCH 1/3] =?UTF-8?q?=E3=82=B3=E3=83=A1=E3=83=B3=E3=83=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.css | 4 ++-- src/App.js | 46 ++++++++++++++++++++++++++++++++++++++-------- tailwind.config.js | 17 ++++++++--------- 3 files changed, 48 insertions(+), 19 deletions(-) diff --git a/src/App.css b/src/App.css index 70e8f87..f1452e2 100644 --- a/src/App.css +++ b/src/App.css @@ -3,7 +3,7 @@ } .App-logo { - height: 40vmin; + height: 3cm; pointer-events: none; } @@ -19,7 +19,7 @@ flex-direction: column; align-items: center; justify-content: center; - font-size: calc(10px + 2vmin); + font-size: xx-large; color: white; } diff --git a/src/App.js b/src/App.js index 8653aec..7c70caa 100644 --- a/src/App.js +++ b/src/App.js @@ -1,22 +1,52 @@ -import logo from './logo.svg'; -import './App.css'; +import logo from "./logo.svg"; +import "./App.css"; +import { useState } from "react"; function App() { + let [count1, setCount] = useState(0); + let [count2, badCount] = useState(0); + return (
-
- logo -

- Welcome to WED Community. +

+ logo +

+ WED Communityへようこそ

- Learn WED + WEDについて→ +

{ + setCount(count1 + 1); + }} + > + 👍{count1} +

+

{ + badCount(count2 + 1); + }} + > + 👎{count2} +

+

{}} + > + ボタンを押した回数:{count1 + count2} +

); diff --git a/tailwind.config.js b/tailwind.config.js index 7780c81..472dadc 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", + "pastel-red": "#ff8484", + "pastel-purple": "#9966ff", + "pastel-green": "#008000", }, + extend: {}, }, plugins: [], -} - +}; From 3a590cf7018d87347b20a5ababb07b1f5c492046 Mon Sep 17 00:00:00 2001 From: work Date: Sat, 19 Oct 2024 06:26:10 +0000 Subject: [PATCH 2/3] =?UTF-8?q?page=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.js | 3 +++ src/NewPage.js | 11 +++++++++++ src/index.js | 17 +++++++++-------- 3 files changed, 23 insertions(+), 8 deletions(-) create mode 100644 src/NewPage.js diff --git a/src/App.js b/src/App.js index 7c70caa..3aa2b36 100644 --- a/src/App.js +++ b/src/App.js @@ -25,6 +25,9 @@ function App() { > WEDについて→ + + コミュニティーページ +

{ diff --git a/src/NewPage.js b/src/NewPage.js new file mode 100644 index 0000000..86c8c56 --- /dev/null +++ b/src/NewPage.js @@ -0,0 +1,11 @@ +import React from "react"; + +function NewPage() { + return ( +

+

コミュニティーページ

+ 10月のイベントについて +
+ ); +} +export default NewPage; diff --git a/src/index.js b/src/index.js index f059a20..d308bc5 100644 --- a/src/index.js +++ b/src/index.js @@ -1,16 +1,17 @@ -import React from 'react'; -import ReactDOM from 'react-dom/client'; -import { BrowserRouter, Route, Routes } from 'react-router-dom'; -import './index.css'; -import App from './App'; -import reportWebVitals from './reportWebVitals'; - -const root = ReactDOM.createRoot(document.getElementById('root')); +import React from "react"; +import ReactDOM from "react-dom/client"; +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( } /> + } /> From eb3c0e1b79e9b4564b881fd3378e63e452c9d58f Mon Sep 17 00:00:00 2001 From: work Date: Sat, 19 Oct 2024 07:39:48 +0000 Subject: [PATCH 3/3] no data --- src/App.js | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/src/App.js b/src/App.js index 3aa2b36..4c4e0f7 100644 --- a/src/App.js +++ b/src/App.js @@ -1,11 +1,16 @@ import logo from "./logo.svg"; import "./App.css"; -import { useState } from "react"; +import { useEffect, useState } from "react"; function App() { let [count1, setCount] = useState(0); let [count2, badCount] = useState(0); - + const [data, setData] = useState(undefined); + useEffect(() => { + fetch("https://api.gethub.com/ussers/t-riku-hub") + .then((res) => res.json()) + .then((json) => setData(json)); + }, []); return (
@@ -50,6 +55,18 @@ function App() { > ボタンを押した回数:{count1 + count2}

+ {data ? ( + <> + icon +

{data.login}

+ + ) : ( +

no data

+ )}
);