mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Splitting url params to pass in catalogURL()
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
parent
5f5b1efadb
commit
b5e8ef1659
@ -31,7 +31,14 @@ export const catalogRoute: RouteProps = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const getPreviousTabUrl = (path: string) => {
|
export const getPreviousTabUrl = (path: string) => {
|
||||||
return `${catalogURL()}/${path || browseCatalogTab}`;
|
const [group, kind] = path.split("/");
|
||||||
|
|
||||||
|
return catalogURL({
|
||||||
|
params: {
|
||||||
|
group: group || browseCatalogTab,
|
||||||
|
kind
|
||||||
|
}
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
export const catalogURL = buildURL<CatalogViewRouteParam>(catalogRoute.path);
|
export const catalogURL = buildURL<CatalogViewRouteParam>(catalogRoute.path);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user