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