Skip to content

Commit

Permalink
fix: Add root path to account url
Browse files Browse the repository at this point in the history
  • Loading branch information
josebui committed Oct 3, 2023
1 parent acc56da commit 6a4f6e5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/account/components/AccountLogin.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const GoogleIcon = props => {

const appendReferrer = (url, referrer) => {
return referrer
? `${url}&state=account?referrerBase64=${btoa(referrer)}`
? `${url}&state=/account?referrerBase64=${btoa(referrer)}`
: url;
};

Expand Down
2 changes: 1 addition & 1 deletion src/account/components/AccountLogin.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ test('AccountLogin: Add referrer', async () => {
);
await render(<AccountLogin />);
expect(screen.getByText('Continue with Google')).toBeInTheDocument();
const state = `account?referrerBase64=${btoa(referrer)}`;
const state = `/account?referrerBase64=${btoa(referrer)}`;
expect(screen.getByText('Continue with Google')).toHaveAttribute(
'href',
`google.url&state=${state}`
Expand Down

0 comments on commit 6a4f6e5

Please sign in to comment.