Added the routes index.jsx
This commit is contained in:
parent
9c42438530
commit
4293c1296d
47
client/src/common/routes/index.jsx
Normal file
47
client/src/common/routes/index.jsx
Normal file
@ -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;
|
||||
}
|
Reference in New Issue
Block a user