Repository: dcapal/dcapal (language: rust)

Issue:
[Bug]: Error on not found page and error page
# **🐞 Bug Report**

## **Describe the bug**

* Error page is not loaded
* Not found page is not loaded
* Demo pages are not loaded

---

### **Is this a regression?**

/

---

### **To Reproduce**

1. Go to dcapal.com/foo
2. Blank page will be shown

---

### **Expected behaviour**

* Required page should be shown

---

### **Media prove** 
 
/
---

### **Your environment**

* OS: macOs
* Node version: 16.15.0
* Npm version: 8.5.5
* Browser name and version: Chrome 117

---

### **Additional context**

/


Discussion / hints:

Fix patch:
diff --git a/dcapal-frontend/src/routes/demoPage.js b/dcapal-frontend/src/routes/demoPage.js
index 19981cae..f7e6d26c 100644
--- a/dcapal-frontend/src/routes/demoPage.js
+++ b/dcapal-frontend/src/routes/demoPage.js
@@ -16,6 +16,7 @@ import {
 import PF_60_40 from "../../demo/dcapal-60-40.json";
 import PF_ALL_SEASONS from "../../demo/dcapal-all-seasons.json";
 import PF_MR_RIP from "../../demo/dcapal-mrrip.json";
+import { useTranslation } from "react-i18next";
 
 const demoPortfolios = {
   [DEMO_PF_60_40]: JSON.stringify(PF_60_40),
@@ -40,6 +41,7 @@ export default function DemoPage() {
   const navigate = useNavigate();
   const dispatch = useDispatch();
   const location = useLocation();
+  const { t } = useTranslation();
 
   const pfolioFile = getPfolioFile(location.pathname);
 
diff --git a/dcapal-frontend/src/routes/errorPage.js b/dcapal-frontend/src/routes/errorPage.js
index bd5dc7bb..17e99c0d 100644
--- a/dcapal-frontend/src/routes/errorPage.js
+++ b/dcapal-frontend/src/routes/errorPage.js
@@ -4,8 +4,10 @@ import { useRouteError } from "react-router-dom";
 import { Footer } from "../components/core/footer";
 import { NavBar } from "../components/core/navBar";
 import { DcaPalHelmet } from "./helmet";
+import { useTranslation } from "react-i18next";
 
 export default function ErrorPage() {
+  const { t } = useTranslation();
   const error = useRouteError();
   console.error(error);
 
diff --git a/dcapal-frontend/src/routes/notFoundPage.js b/dcapal-frontend/src/routes/notFoundPage.js
index 81bdd669..b24bebff 100644
--- a/dcapal-frontend/src/routes/notFoundPage.js
+++ b/dcapal-frontend/src/routes/notFoundPage.js
@@ -6,8 +6,11 @@ import NOT_FOUND from "@images/headers/not-found.svg";
 
 import { DcaPalHelmet } from "./helmet";
 import { Footer } from "../components/core/footer";
+import { useTranslation } from "react-i18next";
 
 export default function NotFoundPage() {
+  const { t } = useTranslation();
+
   return (
     <>
       <DcaPalHelmet title="Not Found" />


Test patch: