mirror of
https://github.com/grafana/grafana.git
synced 2025-02-13 00:55:47 -06:00
* Scenes: Progress on demo app * Argh * Fixing breadcrumbs * Added spacer * Conditional scene objects * Quick and dirty test for drilldown link via panel title * Changed the toggle * Add url state syncing for most links * Add url state syncing for most links * Fix instance in url params * Quick and dirty tabs on the handler page * fixing breadcrumbs * Hide footer * Updates * new table styles * Update table cell link styles * Added search box * Scene app demo: dynamic data link (#60398) * Dynamically build data links * Add field override tests * Updates * Updated * Updates * before nesting routing * Something is working * Caching and nested routes working * Simplify model * Use app components from grafana/scenes * Make the monitoring app work with section nav * Fixing * Update scenes * Remove unused route * Updates * remove file * Update scenes version and use new features * Remove semicolon * removed unused thing * Add refresh pickers --------- Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
14 lines
425 B
TypeScript
14 lines
425 B
TypeScript
import { useLocation } from 'react-router-dom';
|
|
|
|
import { UrlQueryMap, urlUtil } from '@grafana/data';
|
|
import { locationSearchToObject } from '@grafana/runtime';
|
|
|
|
export function useAppQueryParams() {
|
|
const location = useLocation();
|
|
return locationSearchToObject(location.search || '');
|
|
}
|
|
|
|
export function getLinkUrlWithAppUrlState(path: string, params: UrlQueryMap): string {
|
|
return urlUtil.renderUrl(path, params);
|
|
}
|