From 780c95686e0a022d92d7af3eadeea6e94cb6d3f3 Mon Sep 17 00:00:00 2001 From: Julian Reinhardt Date: Tue, 26 Oct 2021 21:46:00 +0200 Subject: [PATCH] Adds fallback to `to` prop of NavigationMenuItem as it is required on a Link --- frontend/src/components/Navigation/NavigationMenuItem.tsx | 4 ++-- frontend/src/locale/IntlProvider.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/components/Navigation/NavigationMenuItem.tsx b/frontend/src/components/Navigation/NavigationMenuItem.tsx index 3edb2e21..9c5b16fd 100644 --- a/frontend/src/components/Navigation/NavigationMenuItem.tsx +++ b/frontend/src/components/Navigation/NavigationMenuItem.tsx @@ -29,7 +29,7 @@ export interface NavigationMenuItemProps { /** * Router Link to if using react-router-dom */ - to?: any; + to?: string; /** * Router Link property if using react-router-dom */ @@ -93,7 +93,7 @@ export const NavigationMenuItem: React.FC = ({ className, )}> { +const loadMessages = (locale?: string): typeof langList & typeof langEn => { locale = locale || "en"; switch (locale.substr(0, 2)) { case "de":