mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-02-01 18:20:17 +01:00
updated frontend
This commit is contained in:
8
frontend/src/utils/path.ts
Normal file
8
frontend/src/utils/path.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
export const getPrimaryPath = (path: string): string => {
|
||||
const arr = path.split('/');
|
||||
if (arr.length <= 1) {
|
||||
return path;
|
||||
} else {
|
||||
return `/${arr[1]}`;
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user