Skip to content

Commit

Permalink
fix(web): for a product to be selected
Browse files Browse the repository at this point in the history
  • Loading branch information
imobachgs committed Jun 11, 2024
1 parent 82edb2d commit 81cfe16
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion web/src/components/overview/OverviewPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import {
} from "@patternfly/react-core";
import { useProduct } from "~/context/product";
import { useInstallerClient } from "~/context/installer";
import { Navigate, Link } from "react-router-dom";
import { Link, Navigate } from "react-router-dom";
import { CardField, EmptyState, Page, InstallButton } from "~/components/core";
import L10nSection from "./L10nSection";
import StorageSection from "./StorageSection";
Expand Down Expand Up @@ -72,13 +72,18 @@ const IssuesList = ({ issues }) => {
};

export default function OverviewPage() {
const { selectedProduct } = useProduct();
const [issues, setIssues] = useState([]);
const client = useInstallerClient();

useEffect(() => {
client.issues().then(setIssues);
}, [client]);

if (selectedProduct === null) {
return <Navigate to="/products" />;
}

return (
<>
<Page.MainContent>
Expand Down

0 comments on commit 81cfe16

Please sign in to comment.