Skip to content

Commit

Permalink
Adding heading to error page
Browse files Browse the repository at this point in the history
  • Loading branch information
carlyrichmond committed Apr 22, 2024
1 parent 614a2eb commit 2e20b70
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions cake-game/src/Error.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@ import { useRouteError } from "react-router-dom";

import StartButton from "./components/start-button/StartButton";
import "./Error.css";
import Header from "./components/header/Header";

function Error() {
const error = useRouteError();
console.error(error);

return (
<>
<Header />
<div id="error-page">
<h1>The cake is a <span className="highlight">lie</span>!</h1>
<p>Sorry, an unexpected error has occurred. Please try again.</p>
Expand Down
2 changes: 1 addition & 1 deletion cake-game/src/main.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const router = createBrowserRouter([
element: <Start />
},
{
path: '/play', //?username=:username',
path: '/play',
element: <Play />
}
]
Expand Down

0 comments on commit 2e20b70

Please sign in to comment.