Skip to content
Snippets Groups Projects
Commit b05f18b2 authored by xaralis's avatar xaralis
Browse files

feat: add 404 page

parent db901971
No related branches found
No related tags found
No related merge requests found
...@@ -6,6 +6,7 @@ import * as Sentry from "@sentry/react"; ...@@ -6,6 +6,7 @@ import * as Sentry from "@sentry/react";
import { loadConfig } from "actions/global-info"; import { loadConfig } from "actions/global-info";
import { loadMe } from "actions/users"; import { loadMe } from "actions/users";
import { initializeWSChannel } from "actions/ws"; import { initializeWSChannel } from "actions/ws";
import Button from "components/Button";
import Footer from "components/Footer"; import Footer from "components/Footer";
import Navbar from "components/Navbar"; import Navbar from "components/Navbar";
import Home from "pages/Home"; import Home from "pages/Home";
...@@ -78,6 +79,22 @@ const LoadingComponent = ( ...@@ -78,6 +79,22 @@ const LoadingComponent = (
</div> </div>
); );
const NotFound = () => (
<article className="container container--default py-8 lg:py-24">
<h1 className="head-alt-base lg:head-alt-lg mb-8">
404ka: Tahle stránka tu není
</h1>
<p className="text-base lg:text-xl mb-8">
Dostali jste se na takzvanou „<strong>čtyřystačtyřku</strong>“, což
znamená, že stránka, kterou jste se pokusili navštívit, na tomhle webu
není.
</p>
<Button routerTo="/" className="text-base lg:text-xl" hoverActive fullwidth>
Přejít na hlavní stránku
</Button>
</article>
);
const BaseApp = () => { const BaseApp = () => {
initializeWSChannel.read(); initializeWSChannel.read();
...@@ -87,6 +104,7 @@ const BaseApp = () => { ...@@ -87,6 +104,7 @@ const BaseApp = () => {
<Switch> <Switch>
<Route exact path="/" children={<Home />} /> <Route exact path="/" children={<Home />} />
<Route exact path="/program" children={<Program />} /> <Route exact path="/program" children={<Program />} />
<Route component={NotFound} />
</Switch> </Switch>
<Footer /> <Footer />
</Router> </Router>
......
...@@ -22,7 +22,7 @@ const GlobalStats = () => { ...@@ -22,7 +22,7 @@ const GlobalStats = () => {
<strong>{onlineMembers}</strong>{" "} <strong>{onlineMembers}</strong>{" "}
<span> <span>
{onlineMembers === 1 && "člen online"} {onlineMembers === 1 && "člen online"}
{onlineMembers > 1 && onlineMembers < 4 && "členové online"} {onlineMembers > 1 && onlineMembers <= 4 && "členové online"}
{(onlineMembers === 0 || onlineMembers > 4) && "členů online"} {(onlineMembers === 0 || onlineMembers > 4) && "členů online"}
</span> </span>
</div> </div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment