diff options
| author | realtradam <[email protected]> | 2024-05-21 23:32:53 -0400 |
|---|---|---|
| committer | realtradam <[email protected]> | 2024-05-21 23:32:53 -0400 |
| commit | 80d64e04441ced7caecd238ae232e749d8e0dddf (patch) | |
| tree | c41d7803a15aa99b51703bbecc56ec2ed2233431 /src/components/Home.jsx | |
| download | malcz.com-80d64e04441ced7caecd238ae232e749d8e0dddf.tar.gz malcz.com-80d64e04441ced7caecd238ae232e749d8e0dddf.zip | |
initial setup of seperating frontend
Diffstat (limited to 'src/components/Home.jsx')
| -rw-r--r-- | src/components/Home.jsx | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/src/components/Home.jsx b/src/components/Home.jsx new file mode 100644 index 0000000..863d81d --- /dev/null +++ b/src/components/Home.jsx @@ -0,0 +1,43 @@ +import React, { } from "react"; +//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 + + 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( + <> + <div> + <div className="flex flex-col gap-16 max-w-6xl shrink"> + <div className="title font-bold text-6xl font-title">Get To Know Me a Little</div> + <div className=""> + <div className="jumbotron jumbotron-fluid bg-transparent"> + <div className="container secondary-color"> + <h1 className="text-2xl">Debug! Again</h1> + <p className=""> +Ea optio vitae culpa voluptatem consectetur. Ab quisquam sed ipsum. Perspiciatis minus odit quas qui consequuntur dicta reiciendis a. Nihil minima sed aliquam. + </p> + <hr className="my-4" /> + </div> + </div> + </div> + </div> + </div> + </> + ); +}; |
