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