Skip to content

Commit a980fc0

Browse files
committed
fix: theme optional chaining
1 parent a377a77 commit a980fc0

18 files changed

Lines changed: 39 additions & 39 deletions

src/components/BenefitPackageGroupPanel.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ import { styled } from '@mui/material/styles';
1616
import { EMPTY_STRING, RIGHT_GROUP_UPDATE, SOCIAL_PROTECTION_MODULE } from '../constants';
1717

1818
const StyledGrid = styled(Grid)(({ theme }) => ({
19-
...theme.table.title,
19+
...theme.table?.title ?? {},
2020
}));
2121

2222
const StyledGridItem = styled(Grid)(({ theme }) => ({
23-
...theme.paper.item,
23+
...theme.paper?.item ?? {},
2424
}));
2525

2626
const StyledFullHeight = styled(Grid)({

src/components/BenefitPackageIndividualPanel.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ import { styled } from '@mui/material/styles';
1717
import { EMPTY_STRING, RIGHT_INDIVIDUAL_UPDATE, SOCIAL_PROTECTION_MODULE } from '../constants';
1818

1919
const StyledGrid = styled(Grid)(({ theme }) => ({
20-
...theme.table.title,
20+
...theme.table?.title ?? {},
2121
}));
2222

2323
const StyledGridItem = styled(Grid)(({ theme }) => ({
24-
...theme.paper.item,
24+
...theme.paper?.item ?? {},
2525
}));
2626

2727
const StyledFullHeight = styled(Grid)({

src/components/BenefitPackagePlanPanel.jsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,19 @@ import { RIGHT_BENEFIT_PLAN_UPDATE, RIGHT_SCHEMA_UPDATE } from '../constants';
1818
import BenefitPlanSchemaModal from '../dialogs/BenefitPlanSchemaModal';
1919

2020
const StyledGrid = styled(Grid)(({ theme }) => ({
21-
...theme.table.title,
21+
...theme.table?.title ?? {},
2222
}));
2323

2424
const StyledGridItem = styled(Grid)(({ theme }) => ({
25-
...theme.paper.item,
25+
...theme.paper?.item ?? {},
2626
}));
2727

2828
const StyledPaper = styled(Paper)(({ theme }) => ({
29-
...theme.paper.paper,
29+
...theme.paper?.paper ?? {},
3030
}));
3131

3232
const StyledPaperHeader = styled(Grid)(({ theme }) => ({
33-
...theme.paper.header,
33+
...theme.paper?.header ?? {},
3434
}));
3535

3636
const StyledFullHeight = styled(Grid)({

src/components/BenefitPackageTabPanel.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ import {
1111
} from '../constants';
1212

1313
const StyledPaper = styled(Paper)(({ theme }) => ({
14-
...theme.paper.paper,
14+
...theme.paper?.paper ?? {},
1515
}));
1616

1717
const StyledGrid = styled(Grid)(({ theme }) => ({
18-
...theme.table.title,
18+
...theme.table?.title ?? {},
1919
display: 'flex',
2020
alignItems: 'center',
2121
}));

src/components/BenefitPlanEligibilityCriteriaPanel.jsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,19 @@ import {
1414
import { isBase64Encoded } from '../util/advanced-criteria-utils';
1515

1616
const StyledPaper = styled(Paper)(({ theme }) => ({
17-
...theme.paper.paper,
17+
...theme.paper?.paper ?? {},
1818
}));
1919

2020
const StyledGrid = styled(Grid)(({ theme }) => ({
21-
...theme.paper.paperHeader,
21+
...theme.paper?.paperHeader ?? {},
2222
}));
2323

2424
const StyledTypography = styled(Typography)(({ theme }) => ({
25-
...theme.table.title,
25+
...theme.table?.title ?? {},
2626
}));
2727

2828
const StyledFiltersGrid = styled(Grid)(({ theme }) => ({
29-
...theme.paper.item,
29+
...theme.paper?.item ?? {},
3030
}));
3131

3232
function BenefitPlanEligibilityCriteriaPanel({

src/components/BenefitPlanHeadPanel.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ import {
2929
import BenefitPlanTypePicker from '../pickers/BenefitPlanTypePicker';
3030

3131
const StyledGrid = styled(Grid)(({ theme }) => ({
32-
...theme.paper.item,
32+
...theme.paper?.item ?? {},
3333
}));
3434

3535
const StyledGridItem = styled(Grid)(({ theme }) => ({
36-
...theme.paper.item,
36+
...theme.paper?.item ?? {},
3737
}));
3838

3939
class BenefitPlanHeadPanel extends FormPanel {

src/components/BenefitPlanTabPanel.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ import {
1212
} from '../constants';
1313

1414
const StyledPaper = styled(Paper)(({ theme }) => ({
15-
...theme.paper.paper,
15+
...theme.paper?.paper ?? {},
1616
}));
1717

1818
const StyledGrid = styled(Grid)(({ theme }) => ({
19-
...theme.table.title,
19+
...theme.table?.title ?? {},
2020
display: 'flex',
2121
alignItems: 'center',
2222
}));

src/components/BenefitPlanTaskPreviewTable.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ import {
1212
import { useSelector } from 'react-redux';
1313

1414
const StyledTable = styled(Table)(({ theme }) => ({
15-
...theme.table,
15+
...theme.table ?? {},
1616
}));
1717

1818
const StyledTableRow = styled(TableRow)(({ theme }) => ({
19-
...theme.table.row,
19+
...theme.table?.row ?? {},
2020
}));
2121

2222
const StyledTableCell = styled(TableCell)({

src/components/ProjectHeadPanel.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ import ProjectStatusPicker from '../pickers/ProjectStatusPicker';
2020
import ActivityPicker from '../pickers/ActivityPicker';
2121

2222
const StyledGrid = styled(Grid)(({ theme }) => ({
23-
...theme.paper.item,
23+
...theme.paper?.item ?? {},
2424
}));
2525

2626
const StyledGridItem = styled(Grid)(({ theme }) => ({
27-
...theme.paper.item,
27+
...theme.paper?.item ?? {},
2828
}));
2929

3030
function ProjectHeadPanel({

src/components/tasks/BeneficiaryUploadApprovalTask.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import { TASK_STATUS, APPROVED, FAILED } from '../../constants';
2727
import { fetchPendingBeneficiaryUploads, resolveTask } from '../../actions';
2828

2929
const StyledPaper = styled(Paper)(({ theme }) => ({
30-
...theme.paper.paper,
30+
...theme.paper?.paper ?? {},
3131
}));
3232

3333
const StyledFabContainer = styled('div')({

0 commit comments

Comments
 (0)