diff --git a/packages/ui-react/src/containers/AccountModal/forms/Registration.tsx b/packages/ui-react/src/containers/AccountModal/forms/Registration.tsx
index ba403fbae..c7443a1c5 100644
--- a/packages/ui-react/src/containers/AccountModal/forms/Registration.tsx
+++ b/packages/ui-react/src/containers/AccountModal/forms/Registration.tsx
@@ -6,8 +6,9 @@ import type { RegistrationFormData } from '@jwp/ott-common/types/account';
import { getModule } from '@jwp/ott-common/src/modules/container';
import AccountController from '@jwp/ott-common/src/controllers/AccountController';
import { checkConsentsFromValues, extractConsentValues, formatConsentsFromValues } from '@jwp/ott-common/src/utils/collection';
+import useSocialLoginUrls from '@jwp/ott-hooks-react/src/useSocialLoginUrls';
import useForm from '@jwp/ott-hooks-react/src/useForm';
-import { modalURLFromLocation } from '@jwp/ott-ui-react/src/utils/location';
+import { modalURLFromLocation, modalURLFromWindowLocation } from '@jwp/ott-ui-react/src/utils/location';
import { useAccountStore } from '@jwp/ott-common/src/stores/AccountStore';
import RegistrationForm from '../../../components/RegistrationForm/RegistrationForm';
@@ -54,6 +55,8 @@ const Registration = () => {
setConsentValues(extractConsentValues(publisherConsents));
}, [accountController, publisherConsents]);
+ const socialLoginURLs = useSocialLoginUrls(modalURLFromWindowLocation('personal-details'));
+
const { handleSubmit, handleChange, handleBlur, values, errors, validationSchemaError, submitting } = useForm
({
initialValues: { email: '', password: '' },
validationSchema: object().shape({
@@ -79,7 +82,6 @@ const Registration = () => {
announce(t('registration.success'), 'success');
navigate(modalURLFromLocation(location, 'personal-details'));
},
- onSubmitError: ({ resetValue }) => resetValue('password'),
});
return (
@@ -96,6 +98,7 @@ const Registration = () => {
consentValues={consentValues}
publisherConsents={publisherConsents}
loading={loading || publisherConsentsLoading}
+ socialLoginURLs={socialLoginURLs}
/>
);
};
diff --git a/packages/ui-react/src/containers/Layout/Layout.module.scss b/packages/ui-react/src/containers/Layout/Layout.module.scss
index 3c8262988..19d703a84 100644
--- a/packages/ui-react/src/containers/Layout/Layout.module.scss
+++ b/packages/ui-react/src/containers/Layout/Layout.module.scss
@@ -19,25 +19,3 @@
.main {
height: 100%;
}
-
-.headerButton {
- overflow: visible;
-
- &::after {
- position: absolute;
- bottom: calc(((variables.$header-height - 36px) / 2) * -1);
- left: 0;
- width: 100%;
- height: 2px;
- background-color: variables.$white;
- content: '';
- }
-
- body:global(.is-tabbing) & {
- &:focus {
- &::after {
- display: none;
- }
- }
- }
-}
diff --git a/packages/ui-react/src/containers/Layout/Layout.tsx b/packages/ui-react/src/containers/Layout/Layout.tsx
index 845f79cc3..f4bba8739 100644
--- a/packages/ui-react/src/containers/Layout/Layout.tsx
+++ b/packages/ui-react/src/containers/Layout/Layout.tsx
@@ -147,6 +147,8 @@ const Layout = () => {
);
};
+ const navItems = [{ label: t('home'), to: '/' }, ...menu.map((item) => ({ label: item.label, to: playlistURL(item.contentId) }))];
+
const containerProps = { inert: sideBarOpen ? '' : undefined }; // inert is not yet officially supported in react
return (
@@ -189,6 +191,7 @@ const Layout = () => {
canLogin={canLogin}
showPaymentsMenuItem={accessModel !== ACCESS_MODEL.AVOD}
favoritesEnabled={favoritesEnabled}
+ siteName={siteName}
profilesData={{
currentProfile: profile,
profiles,
@@ -196,12 +199,8 @@ const Layout = () => {
selectProfile: ({ avatarUrl, id }) => selectProfile.mutate({ id, avatarUrl }),
isSelectingProfile: selectProfile.isLoading,
}}
- >
-
- {menu.map((item) => (
-
- ))}
-
+ navItems={navItems}
+ />
diff --git a/packages/ui-react/src/containers/Layout/__snapshots__/Layout.test.tsx.snap b/packages/ui-react/src/containers/Layout/__snapshots__/Layout.test.tsx.snap
index 1bef0cce5..1a795957a 100644
--- a/packages/ui-react/src/containers/Layout/__snapshots__/Layout.test.tsx.snap
+++ b/packages/ui-react/src/containers/Layout/__snapshots__/Layout.test.tsx.snap
@@ -49,15 +49,19 @@ exports[` > renders layout 1`] = `
; // component instead of hook to prevent extra re-renders
+ return ; // component instead of hook to prevent extra re-renders
}
if (userData.user && selectingProfileAvatar !== null) {
diff --git a/platforms/web/test-e2e/tests/account_test.ts b/platforms/web/test-e2e/tests/account_test.ts
index 075c2d53f..67048a745 100644
--- a/platforms/web/test-e2e/tests/account_test.ts
+++ b/platforms/web/test-e2e/tests/account_test.ts
@@ -52,7 +52,7 @@ function runTestSuite(config: typeof testConfigs.svod, providerName: string, res
I.see('Password');
I.see('Edit password');
- I.see('Profile info');
+ I.see('Account info');
I.see('First name');
I.seeInField('input[name="firstName"][readonly]', firstName);
I.see('Last name');
@@ -253,7 +253,7 @@ function runTestSuite(config: typeof testConfigs.svod, providerName: string, res
Scenario(`I can update my consents - ${providerName}`, async ({ I }) => {
I.amOnPage(constants.accountsUrl);
- I.waitForText('Profile info', longTimeout);
+ I.waitForText('Account info', longTimeout);
I.scrollTo('//*[text() = "Legal & Marketing"]', undefined, -100);
I.dontSeeCheckboxIsChecked(consentCheckbox);