-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added router and CSS * re-ordered some components, made CSS changes, added 404 page * Added alt text to image on Error404 component
- Loading branch information
1 parent
8e3a155
commit 3d30eba
Showing
13 changed files
with
168 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,3 +21,6 @@ | |
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# Local Netlify folder | ||
.netlify |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/* /index.html 200 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import React from "react"; | ||
import { NavLink } from "react-router-dom"; | ||
|
||
const Error404 = () => { | ||
return ( | ||
<div className="error404-div"> | ||
<h1>Error 404</h1> | ||
<img | ||
src={require("../images/logo192.png")} | ||
alt="Truth Tally logo" | ||
width="100px" | ||
></img> | ||
<h2>Not Found</h2> | ||
<NavLink to="/">Start a new list</NavLink> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Error404; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,7 @@ | ||
import React from 'react'; | ||
|
||
import React from "react"; | ||
|
||
const Header = () => { | ||
return ( | ||
<header> | ||
Truth Tally | ||
</header> | ||
); | ||
} | ||
return <header>Truth Tally's</header>; | ||
}; | ||
|
||
export default Header; | ||
export default Header; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,24 @@ | ||
import React from 'react'; | ||
import Item from './Item'; | ||
import AddItemForm from './AddItemForm'; | ||
import React from "react"; | ||
import Item from "./Item"; | ||
import AddItemForm from "./AddItemForm"; | ||
|
||
const ItemsList = ({items, handleAddItem, gameState, handleRemoveItem}) => { | ||
|
||
if (gameState === 'start') { | ||
const ItemsList = ({ items, handleAddItem, gameState, handleRemoveItem }) => { | ||
if (gameState === "start") { | ||
return ( | ||
<div className="items-list"> | ||
|
||
<AddItemForm | ||
handleAddItem={handleAddItem} | ||
items={items} | ||
/> | ||
{items.map(item => | ||
<Item | ||
item={item.item} | ||
handleRemoveItem={handleRemoveItem} | ||
score={item.score} | ||
id={item.id} | ||
key={item.id.toString()} | ||
/> | ||
)} | ||
|
||
</div> | ||
<div className="items-list"> | ||
<AddItemForm handleAddItem={handleAddItem} items={items} /> | ||
{items.map((item) => ( | ||
<Item | ||
item={item.item} | ||
handleRemoveItem={handleRemoveItem} | ||
score={item.score} | ||
id={item.id} | ||
key={item.id.toString()} | ||
/> | ||
))} | ||
</div> | ||
); | ||
} | ||
} | ||
}; | ||
|
||
export default ItemsList; | ||
export default ItemsList; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.