diff --git a/front/src/sync-hooks/HotkeysScopeAutoSyncHook.tsx b/front/src/sync-hooks/HotkeysScopeAutoSyncHook.tsx
new file mode 100644
index 0000000000..c4e0932016
--- /dev/null
+++ b/front/src/sync-hooks/HotkeysScopeAutoSyncHook.tsx
@@ -0,0 +1,7 @@
+import { useHotkeysScopeAutoSync } from '@/hotkeys/hooks/internal/useHotkeysScopeAutoSync';
+
+export function HotkeysScopeAutoSyncHook() {
+ useHotkeysScopeAutoSync();
+
+ return <>>;
+}
diff --git a/front/src/sync-hooks/HotkeysScopeBrowserRouterSync.tsx b/front/src/sync-hooks/HotkeysScopeBrowserRouterSync.tsx
new file mode 100644
index 0000000000..1b29e6da41
--- /dev/null
+++ b/front/src/sync-hooks/HotkeysScopeBrowserRouterSync.tsx
@@ -0,0 +1,71 @@
+import { useEffect } from 'react';
+
+import { useSetHotkeysScope } from '@/hotkeys/hooks/useSetHotkeysScope';
+import { InternalHotkeysScope } from '@/hotkeys/types/internal/InternalHotkeysScope';
+import { PageHotkeysScope } from '@/hotkeys/types/internal/PageHotkeysScope';
+
+import { useIsMatchingLocation } from './hooks/useIsMatchingLocation';
+import { AppBasePath } from './types/AppBasePath';
+import { AppPath } from './types/AppPath';
+import { AuthPath } from './types/AuthPath';
+import { SettingsPath } from './types/SettingsPath';
+
+export function HotkeysScopeBrowserRouterSync() {
+ const isMatchingLocation = useIsMatchingLocation();
+
+ const setHotkeysScope = useSetHotkeysScope();
+
+ useEffect(() => {
+ switch (true) {
+ case isMatchingLocation(AppBasePath.Root, AppPath.CompaniesPage): {
+ setHotkeysScope(InternalHotkeysScope.Table, { goto: true });
+ break;
+ }
+ case isMatchingLocation(AppBasePath.Root, AppPath.PeoplePage): {
+ setHotkeysScope(InternalHotkeysScope.Table, { goto: true });
+ break;
+ }
+ case isMatchingLocation(AppBasePath.Root, AppPath.CompanyShowPage): {
+ setHotkeysScope(PageHotkeysScope.CompanyShowPage, { goto: true });
+ break;
+ }
+ case isMatchingLocation(AppBasePath.Root, AppPath.PersonShowPage): {
+ setHotkeysScope(PageHotkeysScope.PersonShowPage, { goto: true });
+ break;
+ }
+ case isMatchingLocation(AppBasePath.Root, AppPath.OpportunitiesPage): {
+ setHotkeysScope(PageHotkeysScope.OpportunitiesPage, { goto: true });
+ break;
+ }
+ case isMatchingLocation(AppBasePath.Auth, AuthPath.Index): {
+ setHotkeysScope(InternalHotkeysScope.AuthIndex);
+ break;
+ }
+ case isMatchingLocation(AppBasePath.Auth, AuthPath.CreateProfile): {
+ setHotkeysScope(InternalHotkeysScope.CreateProfile);
+ break;
+ }
+ case isMatchingLocation(AppBasePath.Auth, AuthPath.CreateWorkspace): {
+ setHotkeysScope(InternalHotkeysScope.CreateWokspace);
+ break;
+ }
+ case isMatchingLocation(AppBasePath.Auth, AuthPath.PasswordLogin): {
+ setHotkeysScope(InternalHotkeysScope.PasswordLogin);
+ break;
+ }
+ case isMatchingLocation(AppBasePath.Settings, SettingsPath.ProfilePage): {
+ setHotkeysScope(PageHotkeysScope.ProfilePage, { goto: true });
+ break;
+ }
+ case isMatchingLocation(
+ AppBasePath.Settings,
+ SettingsPath.WorkspaceMembersPage,
+ ): {
+ setHotkeysScope(PageHotkeysScope.WorkspaceMemberPage, { goto: true });
+ break;
+ }
+ }
+ }, [isMatchingLocation, setHotkeysScope]);
+
+ return <>>;
+}
diff --git a/front/src/sync-hooks/HotkeysScopeStackAutoSyncHook.tsx b/front/src/sync-hooks/HotkeysScopeStackAutoSyncHook.tsx
deleted file mode 100644
index 95135b2594..0000000000
--- a/front/src/sync-hooks/HotkeysScopeStackAutoSyncHook.tsx
+++ /dev/null
@@ -1,7 +0,0 @@
-import { useHotkeysScopeStackAutoSync } from '@/hotkeys/hooks/internal/useHotkeysScopeStackAutoSync';
-
-export function HotkeysScopeStackAutoSyncHook() {
- useHotkeysScopeStackAutoSync();
-
- return <>>;
-}
diff --git a/front/src/sync-hooks/hooks/useIsMatchingLocation.ts b/front/src/sync-hooks/hooks/useIsMatchingLocation.ts
new file mode 100644
index 0000000000..3db913d010
--- /dev/null
+++ b/front/src/sync-hooks/hooks/useIsMatchingLocation.ts
@@ -0,0 +1,16 @@
+import { matchPath, useLocation } from 'react-router-dom';
+import { parse } from 'url';
+
+import { AppBasePath } from '../types/AppBasePath';
+
+export function useIsMatchingLocation() {
+ const location = useLocation();
+
+ return function isMatchingLocation(basePath: AppBasePath, path: string) {
+ const constructedPath = basePath
+ ? parse(`${basePath}/${path}`).pathname ?? ''
+ : path;
+
+ return !!matchPath(constructedPath, location.pathname);
+ };
+}
diff --git a/front/src/sync-hooks/types/AppBasePath.ts b/front/src/sync-hooks/types/AppBasePath.ts
new file mode 100644
index 0000000000..a9ae5f7579
--- /dev/null
+++ b/front/src/sync-hooks/types/AppBasePath.ts
@@ -0,0 +1,5 @@
+export enum AppBasePath {
+ Auth = '/auth',
+ Settings = '/settings',
+ Root = '/',
+}
diff --git a/front/src/sync-hooks/types/AppPath.ts b/front/src/sync-hooks/types/AppPath.ts
new file mode 100644
index 0000000000..1702647635
--- /dev/null
+++ b/front/src/sync-hooks/types/AppPath.ts
@@ -0,0 +1,9 @@
+export enum AppPath {
+ AuthCatchAll = `/auth/*`,
+ PeoplePage = '/people',
+ CompaniesPage = '/companies',
+ CompanyShowPage = '/companies/:companyId',
+ PersonShowPage = '/person/:personId',
+ OpportunitiesPage = '/opportunities',
+ SettingsCatchAll = `/settings/*`,
+}
diff --git a/front/src/sync-hooks/types/AuthPath.ts b/front/src/sync-hooks/types/AuthPath.ts
new file mode 100644
index 0000000000..e528e46ada
--- /dev/null
+++ b/front/src/sync-hooks/types/AuthPath.ts
@@ -0,0 +1,7 @@
+export enum AuthPath {
+ Index = '',
+ Callback = 'callback',
+ PasswordLogin = 'password-login',
+ CreateWorkspace = 'create/workspace',
+ CreateProfile = 'create/profile',
+}
diff --git a/front/src/sync-hooks/types/SettingsPath.ts b/front/src/sync-hooks/types/SettingsPath.ts
new file mode 100644
index 0000000000..dcf282e032
--- /dev/null
+++ b/front/src/sync-hooks/types/SettingsPath.ts
@@ -0,0 +1,5 @@
+export enum SettingsPath {
+ ProfilePage = 'profile',
+ WorkspaceMembersPage = 'workspace-members',
+ Workspace = 'workspace',
+}
diff --git a/front/yarn.lock b/front/yarn.lock
index 744a627391..ae321e62ad 100644
--- a/front/yarn.lock
+++ b/front/yarn.lock
@@ -15589,7 +15589,7 @@ pumpify@^1.3.3:
inherits "^2.0.3"
pump "^2.0.0"
-punycode@^1.3.2:
+punycode@^1.3.2, punycode@^1.4.1:
version "1.4.1"
resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e"
integrity sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==
@@ -15639,7 +15639,7 @@ qs@6.11.0:
dependencies:
side-channel "^1.0.4"
-qs@^6.10.0, qs@^6.11.1, qs@^6.4.0:
+qs@^6.10.0, qs@^6.11.0, qs@^6.11.1, qs@^6.4.0:
version "6.11.2"
resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.2.tgz#64bea51f12c1f5da1bc01496f48ffcff7c69d7d9"
integrity sha512-tDNIz22aBzCDxLtVH++VnTfzxlfeK5CbqohpSqpJgj1Wg/cQbStNAz3NuqCs5vV+pjBsK4x4pN9HlVh7rcYRiA==
@@ -18285,6 +18285,14 @@ url-parse@^1.5.3:
querystringify "^2.1.1"
requires-port "^1.0.0"
+url@^0.11.1:
+ version "0.11.1"
+ resolved "https://registry.yarnpkg.com/url/-/url-0.11.1.tgz#26f90f615427eca1b9f4d6a28288c147e2302a32"
+ integrity sha512-rWS3H04/+mzzJkv0eZ7vEDGiQbgquI1fGfOad6zKvgYQi1SzMmhl7c/DdRGxhaWrVH6z0qWITo8rpnxK/RfEhA==
+ dependencies:
+ punycode "^1.4.1"
+ qs "^6.11.0"
+
urlpattern-polyfill@^8.0.0:
version "8.0.2"
resolved "https://registry.yarnpkg.com/urlpattern-polyfill/-/urlpattern-polyfill-8.0.2.tgz#99f096e35eff8bf4b5a2aa7d58a1523d6ebc7ce5"