From 4293c1296db47e16c21cdab578320bbf2e27873c Mon Sep 17 00:00:00 2001
From: Mathias Wagner <germannewsmaker@gmail.com>
Date: Tue, 30 May 2023 18:10:35 +0200
Subject: [PATCH] Added the routes index.jsx

---
 client/src/common/routes/index.jsx | 47 ++++++++++++++++++++++++++++++
 1 file changed, 47 insertions(+)
 create mode 100644 client/src/common/routes/index.jsx

diff --git a/client/src/common/routes/index.jsx b/client/src/common/routes/index.jsx
new file mode 100644
index 0000000..d572d15
--- /dev/null
+++ b/client/src/common/routes/index.jsx
@@ -0,0 +1,47 @@
+import {faFolder, faLock, faQuestionCircle, faTerminal, faUnlock} from "@fortawesome/free-solid-svg-icons";
+import Home from "@/pages/tools/general/Home";
+
+export const routes = {
+    Allgemein: [
+        {
+            path: '/',
+            name: 'Was ist das?',
+            icon: faQuestionCircle,
+            component: <Home />
+        }
+    ],
+    Base64: [
+        {
+            path: '/base64/encode',
+            name: 'Base64 Encode',
+            icon: faLock
+        },
+        {
+            path: '/base64/decode',
+            name: 'Base64 Decode',
+            icon: faUnlock
+        }
+    ],
+    Linux: [
+        {
+            path: '/linux/ssh',
+            name: 'Remote-SSH',
+            icon: faTerminal
+        },
+        {
+            path: '/linux/sftp',
+            name: 'Remote-SFTP',
+            icon: faFolder
+        }
+    ]
+}
+
+export const getByPath = (path) => {
+    let result = null;
+    Object.keys(routes).forEach(key => {
+        routes[key].forEach(route => {
+            if (route.path === path) result = {...route, category: key}
+        })
+    })
+    return result;
+}
\ No newline at end of file