refacto: extract app urls to constant file

This commit is contained in:
Sonny
2023-05-28 02:23:49 +02:00
parent 12a3a62d0e
commit 0d1917ebfb
11 changed files with 91 additions and 46 deletions

30
src/constants/paths.ts Normal file
View File

@@ -0,0 +1,30 @@
const PATHS = {
LOGIN: "/signin",
HOME: "/",
CATEGORY: {
CREATE: "/category/create",
EDIT: "/category/edit",
REMOVE: "/category/remove",
},
LINK: {
CREATE: "/link/create",
EDIT: "/link/edit",
REMOVE: "/link/remove",
},
API: {
CATEGORY: {
CREATE: "/category/create",
EDIT: "/category/edit",
REMOVE: "/category/remove",
},
LINK: {
CREATE: "/link/create",
EDIT: "/link/edit",
REMOVE: "/link/remove",
},
},
NOT_FOUND: "/404",
SERVER_ERROR: "/505",
};
export default PATHS;