diff --git a/client/src/common/routes/index.jsx b/client/src/common/routes/index.jsx index bca8a00..f26d87c 100644 --- a/client/src/common/routes/index.jsx +++ b/client/src/common/routes/index.jsx @@ -14,6 +14,7 @@ import QRCode from "@/pages/tools/general/QRCode"; import InstallSoftware from "@/pages/tools/linux/InstallSoftware"; import RemoteSSH from "@/pages/tools/linux/RemoteSSH"; import RemoteSFTP from "@/pages/tools/linux/RemoteSFTP"; +import {createRef} from "react"; export const routes = { Allgemein: [ @@ -21,13 +22,15 @@ export const routes = { path: '/', name: 'Was ist das?', icon: faQuestionCircle, - component: + component: , + ref: createRef() }, { path: '/qr', name: 'QR-Code erstellen', icon: faQrcode, - component: + component: , + ref: createRef() } ], Base64: [ @@ -35,13 +38,15 @@ export const routes = { path: '/base64/encode', name: 'Base64 Encode', icon: faLock, - component: + component: , + ref: createRef() }, { path: '/base64/decode', name: 'Base64 Decode', icon: faUnlock, - component: + component: , + ref: createRef() } ], Linux: [ @@ -49,19 +54,22 @@ export const routes = { path: '/linux/ssh', name: 'Remote-SSH', icon: faTerminal, - component: + component: , + ref: createRef() }, { path: '/linux/sftp', name: 'Remote-SFTP', icon: faFolder, - component: + component: , + ref: createRef() }, { path: '/linux/software', name: 'Software', icon: faBox, - component: + component: , + ref: createRef() } ] } @@ -72,6 +80,10 @@ export const getByPath = (path) => { routes[key].forEach(route => { if (route.path === path) result = {...route, category: key} }) - }) + }); + + if (result === null) + result = {path: "/404", name: "404", icon: faQuestionCircle, ref: createRef()} + return result; } \ No newline at end of file