Skip to content

Commit 7410080

Browse files
committed
[web] InstallButton: fix link to IssuesPage
By using a link instead of a buton since it a link that navigates to a different place, not a button that triggers an action. Additionally, it uses HTML <strong> element for wrapping a important message in the confirmation dialog instead of just marking it as `bold` via CSS.
1 parent 4e11228 commit 7410080

File tree

1 file changed

+7
-15
lines changed

1 file changed

+7
-15
lines changed

web/src/components/core/InstallButton.jsx

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -23,34 +23,26 @@ import React, { useState } from "react";
2323
import { useInstallerClient } from "~/context/installer";
2424

2525
import { Button } from "@patternfly/react-core";
26-
import { useNavigate } from "react-router-dom";
26+
import { Link } from "react-router-dom";
2727

2828
import { If, Popup } from "~/components/core";
2929
import { _ } from "~/i18n";
3030

3131
const InstallConfirmationPopup = ({ hasIssues, onAccept, onClose }) => {
32-
const navigate = useNavigate();
33-
3432
const IssuesWarning = () => {
35-
const IssuesLink = ({ text }) => {
36-
return (
37-
<Button variant="link" isInline onClick={() => navigate("/issues")}>
38-
{text}
39-
</Button>
40-
);
41-
};
42-
4333
// TRANSLATORS: the installer reports some errors,
4434
// the text in square brackets [] is a clickable link
4535
const [msgStart, msgLink, msgEnd] = _("There are some reported issues. \
4636
Please, check [the list of issues] \
4737
before proceeding with the installation.").split(/[[\]]/);
4838

4939
return (
50-
<p className="bold">
51-
{msgStart}
52-
<IssuesLink text={msgLink} />
53-
{msgEnd}
40+
<p>
41+
<strong>
42+
{msgStart}
43+
<Link to="/issues">{msgLink}</Link>
44+
{msgEnd}
45+
</strong>
5446
</p>
5547
);
5648
};

0 commit comments

Comments
 (0)