fix(settings routing): handle trailing slashes in base paths (#10055)
Adjusted URL construction to properly handle trailing slashes in base paths, ensuring consistent matching logic. Added logic for setting the hotkey scope when navigating to the domain settings path.
This commit is contained in:
@ -34,9 +34,9 @@ jest.mock('~/hooks/useIsMatchingLocation');
|
||||
const mockUseIsMatchingLocation = jest.mocked(useIsMatchingLocation);
|
||||
|
||||
const setupMockIsMatchingLocation = (pathname: string) => {
|
||||
mockUseIsMatchingLocation.mockReturnValueOnce(
|
||||
(path: string) => path === pathname,
|
||||
);
|
||||
mockUseIsMatchingLocation.mockReturnValueOnce({
|
||||
isMatchingLocation: (path: string) => path === pathname,
|
||||
});
|
||||
};
|
||||
|
||||
const getResult = (isDefaultLayoutAuthModalVisible = true) =>
|
||||
|
||||
@ -11,7 +11,7 @@ import { OnboardingStatus, SubscriptionStatus } from '~/generated/graphql';
|
||||
import { useIsMatchingLocation } from '~/hooks/useIsMatchingLocation';
|
||||
|
||||
export const useShowAuthModal = () => {
|
||||
const isMatchingLocation = useIsMatchingLocation();
|
||||
const { isMatchingLocation } = useIsMatchingLocation();
|
||||
const isLoggedIn = useIsLogged();
|
||||
const onboardingStatus = useOnboardingStatus();
|
||||
const subscriptionStatus = useSubscriptionStatus();
|
||||
|
||||
Reference in New Issue
Block a user