Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions dotcom-rendering/src/components/TopBarSupport.importable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import { css } from '@emotion/react';
import { getCookie, isUndefined } from '@guardian/libs';
import type { ComponentEvent } from '@guardian/ophan-tracker-js';
import { getHeader } from '@guardian/support-dotcom-components';
import type {
HeaderPayload,
ModuleData,
Expand All @@ -18,9 +17,11 @@ import type {
import { useEffect, useState } from 'react';
import { submitComponentEvent } from '../client/ophan/ophan';
import {
getAuthHeaders,
getPurchaseInfo,
shouldHideSupportMessaging,
} from '../lib/contributions';
import { getHeader } from '../lib/sdcRequests';
import { useBetaAB } from '../lib/useAB';
import { useIsSignedIn } from '../lib/useAuthStatus';
import { useCountryCode } from '../lib/useCountryCode';
Expand Down Expand Up @@ -90,7 +91,10 @@ const ReaderRevenueLinksRemote = ({
},
};

getHeader(contributionsServiceUrl, requestData)
void getAuthHeaders()
.then((headers) =>
getHeader(contributionsServiceUrl, requestData, headers),
)
.then((response: ModuleDataResponse<HeaderProps>) => {
if (!response.data) {
return null;
Expand Down
3 changes: 2 additions & 1 deletion dotcom-rendering/src/lib/sdcRequests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,5 +112,6 @@ export const getGutterLiveblog = (
export const getHeader = (
baseUrl: string,
payload: HeaderPayload,
headers?: HeadersInit,
): Promise<ModuleDataResponse<HeaderProps>> =>
getModuleData('header', baseUrl, payload);
getModuleData('header', baseUrl, payload, headers);
Loading