import { Box, Button, ColumnLayout, Container, Header, SpaceBetween } from "@awsui/components-react"; import React, { useEffect, useRef, useState } from "react"; import { Link } from "react-router-dom"; import { externalUrls } from "../../constants/externalUrls"; import { getTargetFramework } from "../../utils/getTargetFramework"; import { InfoLink } from "../InfoLink"; const SettingsDashboardInternal: React.FC = () => { const isShared = useRef(); const showShareMetrics = useRef(); const [applicationVersion, setApplicationVersion] = useState(undefined); const [targetFramwork, setTargetFramework] = useState(undefined); useEffect(() => { (async () => { var profile = await window.electron.getState("profile"); var useDefaultCreds = await window.electron.getState("useDefaultCreds"); showShareMetrics.current = profile !== "" || useDefaultCreds; })(); }, [showShareMetrics]); useEffect(() => { (async () => { setTargetFramework(await getTargetFramework()); })(); }, []); useEffect(() => { (async () => { setApplicationVersion(await window.electron.getVersion()); })(); }, []); const shareState = window.electron.getState("share"); isShared.current = shareState ? "Enabled" : "Disabled"; return (
You can change your AWS CLI profile information so that Porting Assistant for .NET can collect metrics to improve your experience. These metrics also help flag issues with the software for AWS to quickly address. If you have not set up your AWS profile, see Learn More below.

) : ( "" ) } learnMoreLinks={ window.electron.getState("profile") ? [ { text: "Configuring the AWS CLI", externalUrl: "https://docs.aws.amazon.com/portingassistant/latest/userguide/porting-assistant-prerequisites.html#porting-assistant-iam-profile" } ] : [] } /> } actions={ } > Settings
Porting Assistant for .NET Settings } > {showShareMetrics.current ? (
Usage data sharing When you share your usage data, Porting Assistant for .NET will collect information only about the public NuGet packages, APIs, and stack traces. This information is used to make the Porting Assistant for .NET product better, for example, to improve the package and API replacement recommendations. Porting Assistant for .NET does not collect any identifying information about you. } learnMoreLinks={[ { text: "Learn More", externalUrl: externalUrls.howItWorks } ]} />
{isShared.current || ""}
) : null}
Application version
{applicationVersion}
Target framework
{targetFramwork}
); }; export const SettingsDashboard = React.memo(SettingsDashboardInternal);