/** * functions and constants which helps to build * nextjs or react router dom navigation operations * for an entity. */ export const NodeDatumNavigationTools = { edit(uniqueId: string, locale?: string) { return `${locale ? "/" + locale : ""}/node-datum/edit/${uniqueId}`; }, create(locale?: string) { return `${locale ? "/" + locale : ""}/node-datum/new`; }, single(uniqueId: string, locale?: string) { return `${locale ? "/" + locale : ""}/node-datum/${uniqueId}`; }, query(params: any = {}, locale?: string) { return `${locale ? "/" + locale : ""}/node-data`; }, /** * Use R series while building router in CRA or nextjs, or react navigation for react Native * Might be useful in Angular as well. **/ Redit: "node-datum/edit/:uniqueId", Rcreate: "node-datum/new", Rsingle: "node-datum/:uniqueId", Rquery: "node-data", };