Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
sergei-maertens committed Jan 21, 2025
1 parent 161f4aa commit 49c9615
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/components/AbortButton/AbortButton.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import useFormContext from 'hooks/useFormContext';

const AbortButton = ({isAuthenticated, onDestroySession}) => {
const intl = useIntl();
const analyticsToolsConfig = useAnalyticsToolsConfig;
const analyticsToolsConfig = useAnalyticsToolsConfig();
const form = useFormContext();

const confirmationMessage = isAuthenticated
Expand Down
2 changes: 1 addition & 1 deletion src/components/Form.spec.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ test('Submitting the form with successful background processing', async () => {
vi.useRealTimers();
await waitForElementToBeRemoved(loader);

// due to the error we get redirected back to the summary page.
// on success, the summary page must display the reference obtained from the backend
expect(await screen.findByRole('heading', {name: 'Confirmation: OF-L337'})).toBeVisible();
});

Expand Down
6 changes: 0 additions & 6 deletions src/components/PostCompletionViews/StatusUrlPoller.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ const StatusUrlPoller = ({statusUrl, onFailureNavigateTo, onConfirmed, children}
}
}
);
if (error) throw error;

if (loading) {
return (
Expand Down Expand Up @@ -79,7 +78,6 @@ const StatusUrlPoller = ({statusUrl, onFailureNavigateTo, onConfirmed, children}
if (error) throw error;

const {
result,
paymentUrl,
publicReference,
reportDownloadUrl,
Expand All @@ -88,10 +86,6 @@ const StatusUrlPoller = ({statusUrl, onFailureNavigateTo, onConfirmed, children}
mainWebsiteUrl,
} = statusResponse;

if (result === RESULT_FAILED) {
throw new Error('Failure should have been handled in the onFailure prop.');
}

return (
<SubmissionStatusContext.Provider
value={{
Expand Down
2 changes: 1 addition & 1 deletion src/components/analytics/AnalyticsToolConfigProvider.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const AnalyticsToolsConfigProvider = ({children}) => {

const {value} = useAsync(async () => {
return await get(`${baseUrl}analytics/analytics-tools-config-info`);
}, [locale]);
}, [baseUrl, locale]);

return (
<AnalyticsToolsConfigContext.Provider value={value}>
Expand Down

0 comments on commit 49c9615

Please sign in to comment.