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