feat: add navigation keys and routing check (#24)
This commit is contained in:
24
src/__data__/urls.ts
Normal file
24
src/__data__/urls.ts
Normal 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 });
|
||||
}
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user