Skip to content

Commit

Permalink
⚰️ [#76] Delete more dead code
Browse files Browse the repository at this point in the history
More dead code that relied on Formio utils which caused our
bundles to be larger than necessary. The backend has been
updated a long time ago to provide the summary data to
display, rather than having to do this client-side.

The benefit is that no longer load anything from formio
outside of the formio-init chunk, which should result
in better perceived performance for end users.
  • Loading branch information
sergei-maertens committed Jan 24, 2025
1 parent f553a25 commit 9a58271
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 54 deletions.
2 changes: 1 addition & 1 deletion src/components/Summary/CosignSummary.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import useSessionTimeout from 'hooks/useSessionTimeout';
import Types from 'types';

import GenericSummary from './GenericSummary';
import {loadSummaryData} from './utils';
import {loadSummaryData} from './data';

const CosignSummary = ({
form,
Expand Down
2 changes: 1 addition & 1 deletion src/components/Summary/SubmissionSummary.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import useRefreshSubmission from 'hooks/useRefreshSubmission';
import useTitle from 'hooks/useTitle';

import GenericSummary from './GenericSummary';
import {loadSummaryData} from './utils';
import {loadSummaryData} from './data';

const completeSubmission = async (submission, statementValues) => {
const response = await post(`${submission.url}/_complete`, statementValues);
Expand Down
7 changes: 7 additions & 0 deletions src/components/Summary/data.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import {get} from 'api';

const loadSummaryData = async submissionUrl => {
return await get(`${submissionUrl.href}/summary`);
};

export {loadSummaryData};
52 changes: 0 additions & 52 deletions src/components/Summary/utils.jsx

This file was deleted.

0 comments on commit 9a58271

Please sign in to comment.