Skip to content

Commit

Permalink
feat: add version footer and fix router PE-5161
Browse files Browse the repository at this point in the history
  • Loading branch information
fedellen committed Dec 7, 2023
1 parent a1521d2 commit c68a69f
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import { GiftForm } from "./GiftForm";
import { RouterPage } from "./components/RouterPage";
import { useErrorMessage } from "./hooks/useErrorMessage";

import { HashRouter as Router, Route, Routes } from "react-router-dom";
import { BrowserRouter as Router, Route, Routes } from "react-router-dom";

function App() {
const [errorMessage, setErrorMessage] = useErrorMessage();

const router = (
<Router basename="/turbo-app">
<Router basename={`${import.meta.env.BASE_URL}`}>
<Routes>
<Route
path="/gift"
Expand Down
18 changes: 18 additions & 0 deletions src/components/RouterPage.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#version-footer {
font-family: "Wavehaus-Bold";
font-size: 14px;
letter-spacing: 0.82px;
padding-top: 4rem;

@media (min-width: 800px) {
font-size: 16px;
}

@media (min-width: 1200px) {
font-size: 18px;
}

justify-self: flex-end;
align-self: flex-end;
text-align: right;
}
2 changes: 2 additions & 0 deletions src/components/RouterPage.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { LogoHeader } from "./LogoHeader";
import "./RouterPage.css";

interface RouterPageProps {
page: JSX.Element;
Expand All @@ -10,6 +11,7 @@ export function RouterPage({ page, errorMessage }: RouterPageProps) {
<>
<LogoHeader errorMessage={errorMessage} />
{page}
<span id="version-footer">v{import.meta.env.PACKAGE_VERSION}</span>
</>
);
}

0 comments on commit c68a69f

Please sign in to comment.