Skip to content

Commit dca3e9c

Browse files
committed
chore: cleanup, refactor + fixes
1 parent 60ff118 commit dca3e9c

File tree

24 files changed

+180
-144
lines changed

24 files changed

+180
-144
lines changed
File renamed without changes.

apps/site/components/EOL/EOLModal/index.tsx renamed to apps/site/components/EOL/EOLModal.tsx

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,14 @@ type EOLModalProps = ComponentProps<typeof Modal> & {
1515
};
1616

1717
const EOLModal: FC<EOLModalProps> = ({
18-
release,
18+
release: { codename, major: version },
1919
vulnerabilities,
2020
...props
2121
}) => {
2222
const t = useTranslations();
2323

24-
const { codename, major: version } = release;
25-
2624
const modalHeading = codename
27-
? t('components.eolModal.title', {
28-
version,
29-
codename,
30-
})
25+
? t('components.eolModal.title', { version, codename })
3126
: t('components.eolModal.titleWithoutCodename', { version });
3227

3328
useMemo(

apps/site/components/EOL/EOLReleaseTable/index.tsx renamed to apps/site/components/EOL/EOLReleaseTable.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import { EOL_VERSION_IDENTIFIER } from '#site/next.constants.mjs';
1515
const EOLReleaseTable: FC = () => {
1616
const releaseData = provideReleaseData();
1717
const vulnerabilities = provideVulnerabilities();
18+
1819
const eolReleases = releaseData.filter(
1920
release => release.status === EOL_VERSION_IDENTIFIER
2021
);
@@ -36,6 +37,7 @@ const EOLReleaseTable: FC = () => {
3637
<th>{t('components.eolTable.details')}</th>
3738
</tr>
3839
</thead>
40+
3941
<tbody>
4042
{eolReleases.map(release => (
4143
<Fragment key={release.major}>
@@ -44,14 +46,17 @@ const EOLReleaseTable: FC = () => {
4446
v{release.major}{' '}
4547
{release.codename ? `(${release.codename})` : ''}
4648
</td>
49+
4750
<td data-label="Date">
4851
<FormattedTime date={release.releaseDate} />
4952
</td>
53+
5054
<td>
5155
<VulnerabilityChips
5256
vulnerabilities={vulnerabilities[release.major]}
5357
/>
5458
</td>
59+
5560
<td>
5661
<LinkWithArrow
5762
className="cursor-pointer"
@@ -61,6 +66,7 @@ const EOLReleaseTable: FC = () => {
6166
</LinkWithArrow>
6267
</td>
6368
</tr>
69+
6470
<EOLModal
6571
release={release}
6672
vulnerabilities={vulnerabilities[release.major]}
File renamed without changes.

apps/site/components/EOL/UnknownSeveritySection/index.tsx renamed to apps/site/components/EOL/UnknownSeveritySection.tsx

File renamed without changes.

apps/site/components/EOL/VulnerabilitiesTable/index.tsx renamed to apps/site/components/EOL/VulnerabilitiesTable.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import classNames from 'classnames';
22
import { useTranslations } from 'next-intl';
33
import type { FC } from 'react';
44

5-
import VulnerabilityChip from '#site/components/EOL/VulnerabilityChips/Chip';
5+
import VulnerabilityChip from '#site/components/EOL/VulnerabilityChips/VulnerabilityChip';
66
import LinkWithArrow from '#site/components/LinkWithArrow';
77
import type { Vulnerability } from '#site/types/vulnerabilities';
88

@@ -51,17 +51,17 @@ const VulnerabilitiesTable: FC<{
5151
{vulnerability.description || vulnerability.overview || '-'}
5252
</td>
5353
<td>
54-
{vulnerability.url ? (
54+
{vulnerability.url && (
5555
<LinkWithArrow
5656
href={vulnerability.url}
5757
target="_blank"
5858
rel="noopener noreferrer"
5959
>
6060
{t('components.eolModal.blogLinkText')}
6161
</LinkWithArrow>
62-
) : (
63-
'—'
6462
)}
63+
64+
{!!vulnerability.url || '-'}
6565
</td>
6666
</tr>
6767
))}

apps/site/components/EOL/VulnerabilityChips/Chip/index.module.css renamed to apps/site/components/EOL/VulnerabilityChips/VulnerabilityChip/index.module.css

File renamed without changes.

apps/site/components/EOL/VulnerabilityChips/Chip/index.tsx renamed to apps/site/components/EOL/VulnerabilityChips/VulnerabilityChip/index.tsx

File renamed without changes.

apps/site/components/EOL/VulnerabilityChips/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import type { FC } from 'react';
22

3-
import VulnerabilityChip from '#site/components/EOL/VulnerabilityChips/Chip';
43
import { SEVERITY_ORDER } from '#site/next.constants.mjs';
54
import type { Severity, Vulnerability } from '#site/types';
65

6+
import VulnerabilityChip from './VulnerabilityChip';
7+
78
type VulnerabilityChipsProps = {
89
vulnerabilities: Array<Vulnerability>;
910
};

apps/site/components/Downloads/MinorReleasesTable/index.module.css renamed to apps/site/components/Releases/MinorReleasesTable/index.module.css

File renamed without changes.

0 commit comments

Comments
 (0)