utils.tsx 393 B

123456789101112131415
  1. // Widget Viewer specific query params so we don't interfere with other params like GSH
  2. export enum WidgetViewerQueryField {
  3. SORT = 'sort',
  4. QUERY = 'query',
  5. LEGEND = 'legend',
  6. PAGE = 'page',
  7. CURSOR = 'cursor',
  8. WIDTH = 'width',
  9. START = 'viewerStart',
  10. END = 'viewerEnd',
  11. }
  12. export function isWidgetViewerPath(pathname: string) {
  13. return pathname.match(/\/widget\/[0-9]+\/$/);
  14. }