feat: add navigation keys and routing check (#24)

This commit is contained in:
RustamRu
2024-11-16 15:41:14 +03:00
parent 897602c471
commit bc629eabdf
9 changed files with 66 additions and 14 deletions

24
src/__data__/urls.ts Normal file
View File

@@ -0,0 +1,24 @@
import { generatePath } from "react-router-dom";
import { getNavigationValue } from "@brojs/cli";
import { Order } from "../models";
export const URLs = {
landing: {
url: getNavigationValue("dry-wash.main"),
getUrl() {
return this.url;
}
},
orderForm: {
url: getNavigationValue("dry-wash.create"),
getUrl() {
return this.url;
}
},
orderView: {
url: getNavigationValue("dry-wash.view.order"),
getUrl(orderId: Order.Id) {
return generatePath(this.url, { orderId });
}
}
};