Skip to content

Commit

Permalink
Merge pull request #59 from hhpr98/I-51
Browse files Browse the repository at this point in the history
I-51 Added footer for site
  • Loading branch information
hhpr98 authored Oct 29, 2023
2 parents 0783248 + ca37dcd commit 6cc00c4
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 14 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "my-travel",
"version": "0.3.10",
"version": "0.3.11",
"private": true,
"homepage": "https://hhpr98.github.io/my-travel",
"dependencies": {
Expand Down
26 changes: 15 additions & 11 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,24 @@ import { HashRouter as Router } from "react-router-dom";
import MainPage from './components/MainPage/MainPage';
import PlaceDetails from './components/PlaceDetails/PlaceDetails';
import PlaceGallery from './components/PlaceGallery/PlaceGallery';
import Footer from './components/Footer/Footer';

function App(): JSX.Element {
return (
<Router>
<Routes>
<Route path="/" element={<MainPage />} />
<Route path="/places/:id" element={<PlaceDetails />} />
<Route path="/gallery" element={<PlaceGallery />} />
<Route
path="*"
element={<Navigate to="/" replace />}
/>
</Routes>
</Router>
<>
<Router>
<Routes>
<Route path="/" element={<MainPage />} />
<Route path="/places/:id" element={<PlaceDetails />} />
<Route path="/gallery" element={<PlaceGallery />} />
<Route
path="*"
element={<Navigate to="/" replace />}
/>
</Routes>
</Router>
<Footer />
</>
);
}

Expand Down
16 changes: 16 additions & 0 deletions src/components/Footer/Footer.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import React from "react";

const Footer = (): JSX.Element => {
return (<div
className="fixed bottom-0 left-0 right-0 z-40 px-4 py-3 text-center text-white bg-gray-800"
>
© All rights reserved <a
className="text-gray-200 underline"
href="https://github.com/hhpr98"
>
@hhpr98
</a>
</div>);
};

export default Footer;

0 comments on commit 6cc00c4

Please sign in to comment.