Skip to content

Commit

Permalink
Fix SonarCloud issues
Browse files Browse the repository at this point in the history
  • Loading branch information
NatSquared committed Jun 26, 2024
1 parent 31571b8 commit 7d5387c
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 11 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.MD
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## June 26, 2024

- **Feature** Redesigned Engagement Cards & added Suggested Engagements to the engagement page
- **Feature** Redesigned Engagement Cards & added Suggested Engagements to the engagement page [🎟️ DESENG-634](https://citz-gdx.atlassian.net/browse/DESENG-634)
- Redesigned the engagement cards to match the new design system
- Added a new section to the engagement page to display suggested engagements
- Engagement cards now take you to the "new look" route
Expand Down
1 change: 0 additions & 1 deletion met-web/src/components/common/Indicators/StatusChip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { SubmissionStatus } from 'constants/engagementStatus';

export interface ChipProps {
label?: string;
invert?: boolean;
statusId: SubmissionStatus;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { Suspense } from 'react';
import { Button } from 'components/common/Input';
import { Box, Grid, Skeleton, ThemeProvider } from '@mui/material';
import { colors } from 'components/common';
import { Await, Link, useLoaderData, useParams } from 'react-router-dom';
import { Await, Link, LinkProps, useLoaderData, useParams } from 'react-router-dom';
import { Engagement } from 'models/engagement';
import { SubmissionStatus } from 'constants/engagementStatus';
import { getStatusFromStatusId } from 'components/common/Indicators/StatusChip';
Expand Down Expand Up @@ -31,6 +31,10 @@ const gridContainerStyles = {
flexDirection: { xs: 'column', md: 'row' },
};

const LinkRenderer: React.ElementType<any> = ({ href, ...props }: Omit<LinkProps, 'to'> & { href: string }) => (

Check warning on line 34 in met-web/src/components/engagement/new/view/EngagementSurveyBlock.tsx

View workflow job for this annotation

GitHub Actions / linting (16.x)

Unexpected any. Specify a different type
<Link to={href} {...props} />
);

export const EngagementSurveyBlock = () => {
const { engagement, widgets } = useLoaderData() as { engagement: Promise<Engagement>; widgets: Promise<Widget[]> };
const surveyBlockContents = Promise.all([engagement, widgets]);
Expand Down Expand Up @@ -149,11 +153,7 @@ export const EngagementSurveyBlock = () => {
? `/engagements/${engagement.id}/dashboard/public`
: `/engagements/${engagement.id}/dashboard/public/${language}`
}
LinkComponent={({ children, href, ...props }) => (
<Link to={href} {...props}>
{children}
</Link>
)}
LinkComponent={LinkRenderer}
>
{translate('buttonText.viewFeedback')}
</Button>
Expand Down
3 changes: 1 addition & 2 deletions met-web/src/components/landing/EngagementTile.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React, { useEffect, useState } from 'react';
import { Card, CardContent, CardMedia, CardActionArea, ThemeProvider } from '@mui/material';
import { Box, Grid, Card, CardContent, CardMedia, CardActionArea, ThemeProvider } from '@mui/material';
import { Engagement } from 'models/engagement';
import { Box, Grid } from '@mui/material';
import { getEngagement } from 'services/engagementService';
import dayjs from 'dayjs';
import { EngagementStatusChip } from 'components/common/Indicators/StatusChip';
Expand Down
1 change: 0 additions & 1 deletion met-web/src/styles/Theme.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { Contrast } from '@mui/icons-material';
import { PaletteMode, createTheme } from '@mui/material';
export const colors = {
type: {
Expand Down

0 comments on commit 7d5387c

Please sign in to comment.