sass setup + stole github button css >:)

This commit is contained in:
2023-03-15 14:44:11 +01:00
parent 82626e06ad
commit c5b1a01fd1
15 changed files with 476 additions and 49 deletions

View File

@@ -1,4 +1,5 @@
import React from "react";
import {GHButton} from "../components/Button";
const ROOM_URL = 'http://localhost:5062/room';
@@ -8,14 +9,8 @@ const Home = () => {
React.useEffect(() => {
fetch(ROOM_URL)
.then((r) => {
console.log(r);
return r.json();
})
.then((data) => {
console.log(data);
setRooms(data);
});
.then(r => r.json())
.then(data => setRooms(data));
}, []);
const handleCreateRoom = () => {
@@ -32,7 +27,7 @@ const Home = () => {
return (
<div>
<button onClick={handleCreateRoom}>Create Room</button>
<GHButton onClick={handleCreateRoom}>Create Room</GHButton>
<ul>
{
rooms.map((room, index) => {