Skip to content

Commit

Permalink
Use language for strong identification
Browse files Browse the repository at this point in the history
  • Loading branch information
mjturt committed Jul 12, 2023
1 parent 36b198d commit 4f2e0e7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions frontend/benefit/applicant/src/hooks/useLogin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ import {
} from 'benefit-shared/backend-api/backend-api';
import { useRouter } from 'next/router';
import React from 'react';
import useLocale from 'shared/hooks/useLocale';

const useLogin = (): (() => Promise<boolean>) => {
const router = useRouter();
const locale = useLocale();
return React.useCallback(
() => router.push(getBackendUrl(BackendEndpoint.LOGIN)),
[router]
() => router.push(`${getBackendUrl(BackendEndpoint.LOGIN)}?lang=${locale}`),
[router, locale]
);
};

Expand Down

0 comments on commit 4f2e0e7

Please sign in to comment.