import { Alert, Box, Icon, SpaceBetween } from "@awsui/components-react"; import React, { useEffect } from "react"; import { useDispatch } from "react-redux"; import { useLocation } from "react-router"; import { DashboardTable } from "../components/Dashboard/DashboardTable"; import { PortingAssistantAppLayout } from "../components/PortingAssistantAppLayout"; import { PortingAssistantBreadcrumb } from "../components/PortingAssistantBreadcrumb"; import { externalUrls } from "../constants/externalUrls"; import { setInfo } from "../store/actions/tools"; const DashboardInternal: React.FC = () => { const dispatch = useDispatch(); const location = useLocation(); const notification = window.electron.getState("notification"); const [visible, setVisible] = React.useState(notification); const newVersionNotification = window.electron.getState("newVersionNotification"); const [visibleNewVersion, setVisibleNewVersion] = React.useState(false); const [latestAppVersion, setlatestAppVersion] = React.useState(undefined); useEffect(() => { dispatch( setInfo({ heading: "Assessed solutions", mainContent: ( <> Select a solution to view the solution details, including an assessment overview. You can also port your projects when you have attained your desired compatibility for the projects. To reassess a solution, choose Reassess solution. To assess a new solution choose the Assess a new solution button. Build errors The number of build errors in the solution. ), learnMoreLinks: [ { text: "How Porting Assistant for .NET works", externalUrl: externalUrls.howItWorks } ] }) ); }, [dispatch, location]); useEffect(() => { (async () => { setlatestAppVersion(await window.electron.getLatestVersion()); })(); }, []); useEffect(() => { (async () => { setVisibleNewVersion((await window.electron.getOutdatedVersionFlag()) && newVersionNotification); })(); }, []); return ( { setVisibleNewVersion(false); window.electron.saveState("newVersionNotification", false); }} buttonText={
Get the Release Note
} onButtonClick={() => { window.electron.openExternalUrl(externalUrls.releaseNotes); }} > Check new features of Porting Assistant for .NET - Version {latestAppVersion}.
{ setVisible(false); window.electron.saveState("notification", false); }} buttonText={
Get the Visual Studio extension
} onButtonClick={() => { window.electron.openExternalUrl(externalUrls.visualstudioExtension); }} >
} breadcrumbs={} /> ); }; const breadcrumb = [ { text: "Porting Assistant for .NET", href: "/main" }, { text: "Assessed solutions", href: "/solutions" } ]; export const Dashboard = React.memo(DashboardInternal);