From 15bf3d5848aa1b7aeb5177f8b9ca84eb9ff5799f Mon Sep 17 00:00:00 2001 From: realtradam Date: Wed, 15 May 2024 20:35:42 -0400 Subject: more styling improvements and gamecards added --- app/javascript/components/Home.jsx | 98 +++++++++++++++++++++----------------- 1 file changed, 54 insertions(+), 44 deletions(-) (limited to 'app/javascript/components/Home.jsx') diff --git a/app/javascript/components/Home.jsx b/app/javascript/components/Home.jsx index 6ead779..b67571c 100644 --- a/app/javascript/components/Home.jsx +++ b/app/javascript/components/Home.jsx @@ -1,52 +1,62 @@ import React, { } from "react"; -import { Link } from "react-router-dom"; +//import { Link } from "react-router-dom"; +import GameCard from "./GameCard"; //export default () => ( export default function Home () { - var handleSubmit = (e) => { - e.preventDefault() //stops submit from happening + var handleSubmit = (e) => { + e.preventDefault() //stops submit from happening - const formData = new FormData() - formData.append('game[title]', e.target.title.value) - formData.append('game[game_file]', e.target.game_file.files[0], e.target.game_file.value) + const formData = new FormData() + formData.append('game[title]', e.target.title.value) + formData.append('game[game_file]', e.target.game_file.files[0], e.target.game_file.value) -for (var pair of formData.entries()) { - console.log(pair[0] + ', ' + pair[1]) -}; - - fetch('http://127.0.0.1:3000/api/v1/games', { - method: 'post', - body: formData, - }); - } - return( - <> -
-
-
-

Games!

-

- All the games I have worked on that run on the web! -

-
- - View Games - -
-
- - - - + for (var pair of formData.entries()) { + console.log(pair[0] + ', ' + pair[1]) + }; - -
-
-
- -); + fetch('http://127.0.0.1:3000/api/v1/games', { + method: 'post', + body: formData, + }); + } + return( + <> +
+
+
Get To Know Me a Little
+
+
+
+

Debug!

+

+Ea optio vitae culpa voluptatem consectetur. Ab quisquam sed ipsum. Perspiciatis minus odit quas qui consequuntur dicta reiciendis a. Nihil minima sed aliquam. +

+
+
+
+ + +
+
+ + +
+ +
+
+
+
+
+ + + + + + +
+
+
+ + ); }; -- cgit v1.2.3