Skip to content

Commit

Permalink
Merge pull request #1473 from hackforla/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
sydneywalcoff authored Jul 6, 2024
2 parents d4002d8 + 6dac40b commit 9bd3008
Show file tree
Hide file tree
Showing 7 changed files with 1,468 additions and 584 deletions.
2 changes: 1 addition & 1 deletion products/statement-generator/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module.exports = {
browser: true,
es2021: true,
},
extends: ['plugin:react/recommended', 'airbnb', 'prettier', 'prettier/react'],
extends: ['plugin:react/recommended', 'airbnb', 'prettier'],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
Expand Down
1,918 changes: 1,407 additions & 511 deletions products/statement-generator/package-lock.json

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions products/statement-generator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"dependencies": {
"@material-ui/core": "^4.11.2",
"@material-ui/icons": "^4.11.2",
"@testing-library/jest-dom": "^6.4.2",
"@testing-library/jest-dom": "^6.4.6",
"@testing-library/react": "^11.1.0",
"@testing-library/user-event": "^12.1.10",
"@types/jspdf": "^1.3.3",
Expand All @@ -21,7 +21,7 @@
"file-saver": "^2.0.5",
"gh-pages": "^5.0.0",
"i18next": "^20.1.0",
"i18next-browser-languagedetector": "^6.1.0",
"i18next-browser-languagedetector": "^8.0.0",
"i18next-http-backend": "^1.4.5",
"jspdf": "^2.3.1",
"react": "^17.0.1",
Expand Down Expand Up @@ -62,13 +62,13 @@
"@types/file-saver": "^2.0.5",
"@types/jest": "^29.5.12",
"@types/node": "^20.4.1",
"@typescript-eslint/eslint-plugin": "^4.9.0",
"@typescript-eslint/eslint-plugin": "^4.33.0",
"@typescript-eslint/parser": "^4.9.0",
"eslint": "^7.15.0",
"eslint-config-airbnb": "^18.2.1",
"eslint-config-prettier": "^6.15.0",
"eslint-config-prettier": "^9.1.0",
"eslint-import-resolver-typescript": "^2.3.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-prettier": "^3.2.0",
"eslint-plugin-react": "^7.21.5",
Expand Down
30 changes: 14 additions & 16 deletions products/statement-generator/src/components/Checkbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,21 +66,19 @@ interface IWrapperCheckboxProps extends IInnerCheckboxProps {
const CheckboxLabels = React.forwardRef<
HTMLInputElement,
IWrapperCheckboxProps
>(({ label, checked, onChange, id, useTeal = false }, ref) => {
return (
<FormControlLabel
control={
<InnerCheckbox
useTeal={useTeal}
id={id}
checked={checked}
onChange={onChange}
ref={ref}
/>
}
label={label}
/>
);
});
>(({ label, checked, onChange, id, useTeal = false }, ref) => (
<FormControlLabel
control={
<InnerCheckbox
useTeal={useTeal}
id={id}
checked={checked}
onChange={onChange}
ref={ref}
/>
}
label={label}
/>
));

export default CheckboxLabels;
10 changes: 3 additions & 7 deletions products/statement-generator/src/components/FAQAccordion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,9 @@ export const FAQAccordion: React.FC<CustomAccordionProps> = ({
<AccordionDetails style={{ padding: 0, width: '100%' }}>
<div className={classes.accordionDetailsContainer}>
{content &&
content.map((paragraph) => {
return (
<Typography
dangerouslySetInnerHTML={{ __html: t(paragraph) }}
/>
);
})}
content.map((paragraph) => (
<Typography dangerouslySetInnerHTML={{ __html: t(paragraph) }} />
))}
{children && children}
</div>
</AccordionDetails>
Expand Down
17 changes: 9 additions & 8 deletions products/statement-generator/src/pages-form/Download.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,15 @@ export default function Download({ onDownloadAgreementCheck }: IDownload) {
return;
}

const docxSections = textSections.map((sectionText) => {
return new Paragraph({
text: sectionText,
spacing: {
after: 360, // 360 TWIPs = 24px
},
});
});
const docxSections = textSections.map(
(sectionText) =>
new Paragraph({
text: sectionText,
spacing: {
after: 360, // 360 TWIPs = 24px
},
})
);

const doc = new Document({
sections: [
Expand Down
65 changes: 29 additions & 36 deletions products/statement-generator/src/pages/Credits.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -532,44 +532,37 @@ export const Filter: React.FC = () => {
return obj;
});

const FilterCards: React.FC = () => {
return (
<div className={classes.CreditContainer}>
{filteredCredits.map((credit) => {
return (
<div className={classes.CreditBox}>
<div className={classes.creditFlex}>
<div className={classes.creditText}>
<h2>{credit.name}</h2>
<p>Used on: {credit.used_in}</p>
<p>Artist: {credit.artist}</p>
<p>
Provider:{' '}
<a href={credit.provider_link}>{credit.provider}</a>
</p>
</div>
<div className={classes.creditImgContainer}>
<img src={credit.img} alt={credit.alt_text} />
</div>
</div>
const FilterCards: React.FC = () => (
<div className={classes.CreditContainer}>
{filteredCredits.map((credit) => (
<div className={classes.CreditBox}>
<div className={classes.creditFlex}>
<div className={classes.creditText}>
<h2>{credit.name}</h2>
<p>Used on: {credit.used_in}</p>
<p>Artist: {credit.artist}</p>
<p>
Provider: <a href={credit.provider_link}>{credit.provider}</a>
</p>
</div>
);
})}
</div>
);
};
<div className={classes.creditImgContainer}>
<img src={credit.img} alt={credit.alt_text} />
</div>
</div>
</div>
))}
</div>
);

const FilterButton = ({ name }: FilterButtonProps) => {
return (
<button
className={classes.FilterLink}
value={name}
onClick={handleFilterClick}
>
{name}
</button>
);
};
const FilterButton = ({ name }: FilterButtonProps) => (
<button
className={classes.FilterLink}
value={name}
onClick={handleFilterClick}
>
{name}
</button>
);

return (
<div className={classes.Filter}>
Expand Down

0 comments on commit 9bd3008

Please sign in to comment.