Skip to content

Commit

Permalink
Landing page element and logo
Browse files Browse the repository at this point in the history
Relates #2 #8

Co-authored-by: shaya <[email protected]>
  • Loading branch information
azizi-a and fairyaksh committed Sep 17, 2020
1 parent 6e3a5a8 commit d8860d4
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 5 deletions.
Binary file added public/Sword-Fish-Fencing.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed public/logo192.png
Binary file not shown.
Binary file removed public/logo512.png
Binary file not shown.
3 changes: 0 additions & 3 deletions public/robots.txt

This file was deleted.

11 changes: 9 additions & 2 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,28 @@ import { getRandomFishData } from "./modules/fetch-helper";

function App() {
const [fishData, setFishData] = React.useState(null);
console.log(fishData);
// opponentFish data

// button activated effect - rejects button
React.useEffect(() => {
getRandomFishData().then((data) => {
setFishData(data);
});
}, []);

return (
// return landing page on first load - logo and randomizer button
// <img src={logo} className="App-logo" alt="logo" />
<div className="App">
<header className="App-header"></header>
{/* title - some kind of fish pun */}
<body className="App-body">
<FishCard {...fishData} />
{/* accept or reject buttons */}
</body>
</div>
);
}

//landing page function
//fight page function
export default App;
21 changes: 21 additions & 0 deletions src/modules/landing-page.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import React from "react";
import logo from "Sword-Fish-Fencing.png";

const LandingPage = () => {
return (
<>
<h1>Fish Fight!</h1>
<img
onClick={/*generate fight page with first fish*/}
src={logo}
className="App-logo"
alt="logo"
/>
<button onClick={/*generate fight page with first fish*/}>
There are plenty of fish in the sea. Which will you be?
</button>
</>
);
};

export default LandingPage;

0 comments on commit d8860d4

Please sign in to comment.