mirror of
https://github.com/umami-software/umami.git
synced 2026-02-06 05:37:20 +01:00
Updated tables. Added MenuButton.
This commit is contained in:
parent
92b283486e
commit
a15c7cd596
27 changed files with 334 additions and 207 deletions
|
|
@ -6,7 +6,8 @@ export function useNavigation() {
|
|||
const router = useRouter();
|
||||
const pathname = usePathname();
|
||||
const params = useSearchParams();
|
||||
const [, teamId] = pathname.match(/^\/teams\/([a-f0-9-]+)/) || [];
|
||||
const [, teamId] = pathname.match(/\/teams\/([a-f0-9-]+)/) || [];
|
||||
const [, websiteId] = pathname.match(/\/websites\/([a-f0-9-]+)/) || [];
|
||||
|
||||
const query = useMemo<{ [key: string]: any }>(() => {
|
||||
const obj = {};
|
||||
|
|
@ -26,5 +27,5 @@ export function useNavigation() {
|
|||
return teamId ? `/teams/${teamId}${url}` : url;
|
||||
}
|
||||
|
||||
return { pathname, query, router, renderUrl, renderTeamUrl, teamId };
|
||||
return { pathname, query, router, renderUrl, renderTeamUrl, teamId, websiteId };
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue