Skip to content

Commit

Permalink
use DCR support header instead of SDC one
Browse files Browse the repository at this point in the history
  • Loading branch information
cemms1 committed May 8, 2024
1 parent 5a78767 commit 5bce21f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
16 changes: 5 additions & 11 deletions dotcom-rendering/src/components/SupportTheG.importable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -224,17 +224,11 @@ const ReaderRevenueLinksRemote = ({
const { module } = response.data;
setSupportHeaderResponse(module);

return window
.guardianPolyfilledImport(module.url)
.then(
(headerModule: {
[key: string]: React.ElementType;
}) => {
setSupportHeader(
() => headerModule[module.name] ?? null,
);
},
);
return import(
/* webpackChunkName: "header" */ `./marketing/header/Header`
).then((headerModule: { [key: string]: React.ElementType }) => {
setSupportHeader(() => headerModule.Header ?? null);
});
})
.catch((error) => {
const msg = `Error importing RR header links: ${String(error)}`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
* This file was migrated from:
* https://github.com/guardian/support-dotcom-components/blob/4925ef1e0ced5d221f1122afe79f93bd7448e0e5/packages/modules/src/modules/headers/HeaderWrapper.tsx
*/
import { headerPropsSchema } from '@guardian/support-dotcom-components';
import type {
Cta,
HeaderProps,
OphanAction,
} from '@guardian/support-dotcom-components/dist/shared/src/types';
import { headerPropsSchema } from '@guardian/support-dotcom-components/dist/shared/src/types';
import { useCallback, useEffect } from 'react';
import { type HasBeenSeen, useHasBeenSeen } from '../hooks/useHasBeenSeen';
import type { ReactComponent } from '../lib/ReactComponent';
Expand Down

0 comments on commit 5bce21f

Please sign in to comment.