From f24a8ca1951e055f16bbc6bb35bc993f4f66e747 Mon Sep 17 00:00:00 2001 From: necoiro Date: Sat, 19 Oct 2024 05:41:16 +0000 Subject: [PATCH 1/4] =?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 | 2 +- src/App.js | 36 ++++++++++++++++++++++++------- src/cat.svg | 53 ++++++++++++++++++++++++++++++++++++++++++++++ tailwind.config.js | 16 ++++++-------- 4 files changed, 89 insertions(+), 18 deletions(-) create mode 100644 src/cat.svg diff --git a/src/App.css b/src/App.css index 70e8f87..9da0921 100644 --- a/src/App.css +++ b/src/App.css @@ -20,7 +20,7 @@ align-items: center; justify-content: center; font-size: calc(10px + 2vmin); - color: white; + color: royalblue; } @keyframes App-logo-spin { diff --git a/src/App.js b/src/App.js index 8653aec..6733498 100644 --- a/src/App.js +++ b/src/App.js @@ -1,22 +1,42 @@ -import logo from './logo.svg'; -import './App.css'; +import logo from "./logo.svg"; +import "./App.css"; +import { useState } from "react"; function App() { + let [count, setCount] = useState(0); + let [count_1, setCount_1] = useState(0); return (
-
- logo -

- Welcome to WED Community. +

+ +

+ WED Communityにようこそ!

- Learn WED + WEDについて +

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

+

{ + setCount_1(count_1 + 1); + }} + > + 😍{count_1} +

); diff --git a/src/cat.svg b/src/cat.svg new file mode 100644 index 0000000..66e0fde --- /dev/null +++ b/src/cat.svg @@ -0,0 +1,53 @@ + + + + + + + diff --git a/tailwind.config.js b/tailwind.config.js index 7780c81..7d5dd07 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -1,16 +1,14 @@ /** @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", + aliceblue: "#f0f8ff", + royalblue: "#4169e1", }, + extend: {}, }, plugins: [], -} - +}; From 5cbe0e268722bce6c6ee510753cf18a5f5db2918 Mon Sep 17 00:00:00 2001 From: necoiro Date: Sat, 19 Oct 2024 05:42:39 +0000 Subject: [PATCH 2/4] =?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/cat.svg | 53 ----------------------------------------------------- 1 file changed, 53 deletions(-) delete mode 100644 src/cat.svg diff --git a/src/cat.svg b/src/cat.svg deleted file mode 100644 index 66e0fde..0000000 --- a/src/cat.svg +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - From 6f7ccd032e308a39c1832e1b3c5a6d518e63f435 Mon Sep 17 00:00:00 2001 From: necoiro Date: Sat, 19 Oct 2024 06:26:03 +0000 Subject: [PATCH 3/4] =?UTF-8?q?=E3=83=9A=E3=83=BC=E3=82=B8=E3=82=92?= =?UTF-8?q?=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 | 7 +++++++ src/index.js | 16 +++++++++------- src/newpage.js | 12 ++++++++++++ 4 files changed, 31 insertions(+), 7 deletions(-) create mode 100644 src/NewPage.js create mode 100644 src/newpage.js diff --git a/src/App.js b/src/App.js index 6733498..c8f6494 100644 --- a/src/App.js +++ b/src/App.js @@ -23,6 +23,9 @@ function App() { > WEDについて + + コミュニティページ +

{ setCount(count + 1); diff --git a/src/NewPage.js b/src/NewPage.js new file mode 100644 index 0000000..7cf8cf6 --- /dev/null +++ b/src/NewPage.js @@ -0,0 +1,7 @@ +import React from "react"; + +function NewPage(){ + return ( + + ) +} \ No newline at end of file diff --git a/src/index.js b/src/index.js index f059a20..e079d49 100644 --- a/src/index.js +++ b/src/index.js @@ -1,16 +1,18 @@ -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 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')); +const root = ReactDOM.createRoot(document.getElementById("root")); root.render( } /> + } /> diff --git a/src/newpage.js b/src/newpage.js new file mode 100644 index 0000000..7a04c79 --- /dev/null +++ b/src/newpage.js @@ -0,0 +1,12 @@ +import React from "react"; + +function NewPage() { + return ( +

+

コミュニティページ

+ 10月のイベントについて +
+ ); +} + +export default NewPage; From a9ad6f01bdfcdeffb00cd4244598c9dcd954264b Mon Sep 17 00:00:00 2001 From: necoiro Date: Sat, 19 Oct 2024 07:38:37 +0000 Subject: [PATCH 4/4] API --- src/App.js | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/src/App.js b/src/App.js index c8f6494..6cac2ee 100644 --- a/src/App.js +++ b/src/App.js @@ -1,10 +1,18 @@ import logo from "./logo.svg"; import "./App.css"; -import { useState } from "react"; +import { useEffect, useState } from "react"; function App() { let [count, setCount] = useState(0); let [count_1, setCount_1] = useState(0); + const [data, setData] = useState(undefined); + + useEffect(() => { + fetch("https://api.github.com/users/necoiro") + .then((res) => res.json()) + .then((json) => setData(json)); + }, []); + return (
@@ -40,6 +48,18 @@ function App() { > 😍{count_1}

+ {data ? ( + <> + icon +

{data.login}

+ + ) : ( +

no data

+ )}
);