From 5f875698e300c381dadbdb9db2771f976ece4a4a Mon Sep 17 00:00:00 2001 From: ianedwards Date: Tue, 21 May 2024 17:10:39 -0400 Subject: [PATCH] remove unused imports (#4675) --- dashboard/src/App.tsx | 1 - dashboard/src/components/AWSCostConsent.tsx | 4 +--- dashboard/src/components/AzureCredentialForm.tsx | 3 +-- dashboard/src/components/Breadcrumb.tsx | 3 +-- dashboard/src/components/CloudFormationForm.tsx | 1 - .../components/ClusterProvisioningPlaceholder.tsx | 4 +--- dashboard/src/components/CredentialsForm.tsx | 6 +----- dashboard/src/components/ExpandableResource.tsx | 2 +- dashboard/src/components/GCPCostConsent.tsx | 4 +--- dashboard/src/components/GCPCredentialsForm.tsx | 4 ---- .../src/components/GCPProvisionerSettings.tsx | 9 --------- dashboard/src/components/GPUCostConsent.tsx | 5 +---- dashboard/src/components/LogSearchBar.tsx | 5 +---- dashboard/src/components/OldTable.tsx | 1 - dashboard/src/components/PreflightChecks.tsx | 2 +- dashboard/src/components/ProvisionerFlow.tsx | 3 +-- dashboard/src/components/ProvisionerForm.tsx | 4 +--- dashboard/src/components/ProvisionerSettings.tsx | 2 -- dashboard/src/components/ProvisionerStatus.tsx | 2 +- dashboard/src/components/SaveButton.tsx | 2 +- .../date-time-picker/DateTimePicker.tsx | 3 +-- .../src/components/form-components/Helper.tsx | 1 - .../src/components/form-components/SelectRow.tsx | 2 +- .../porter-form/field-components/CronInput.tsx | 1 - .../porter-form/field-components/Dictionary.tsx | 3 +-- .../field-components/KeyValueArray.tsx | 2 +- dashboard/src/components/porter-form/utils.ts | 3 +-- dashboard/src/components/porter/Banner.tsx | 1 - dashboard/src/components/porter/Button.tsx | 2 +- dashboard/src/components/porter/ClickToCopy.tsx | 2 +- dashboard/src/components/porter/Clickable.tsx | 1 - .../src/components/porter/DictionaryEditor.tsx | 2 -- dashboard/src/components/porter/Dropdown.tsx | 4 +--- .../src/components/porter/ExpandableSection.tsx | 2 +- dashboard/src/components/porter/Fieldset.tsx | 2 +- dashboard/src/components/porter/Input.tsx | 3 +-- dashboard/src/components/porter/InputSlider.tsx | 4 +--- dashboard/src/components/porter/Modal.tsx | 2 +- dashboard/src/components/porter/Pagination.tsx | 1 - dashboard/src/components/porter/SearchBar.tsx | 2 +- dashboard/src/components/porter/Spacer.tsx | 2 +- dashboard/src/components/porter/Step.tsx | 2 +- dashboard/src/components/porter/Text.tsx | 2 +- dashboard/src/components/porter/VerticalSteps.tsx | 5 +---- .../src/components/repo-selector/RepoList.tsx | 2 -- dashboard/src/lib/hooks/useJobs.ts | 1 - dashboard/src/main/auth/InfoPanel.tsx | 2 +- dashboard/src/main/auth/SetInfo.tsx | 2 -- dashboard/src/main/auth/VerifyEmail.tsx | 3 --- .../main/home/add-on-dashboard/AddOnDashboard.tsx | 1 - .../home/add-on-dashboard/ConfigureTemplate.tsx | 3 +-- .../home/add-on-dashboard/ExpandedTemplate.tsx | 4 +--- .../add-on-dashboard/legacy_AddOnDashboard.tsx | 2 -- .../home/add-on-dashboard/legacy_NewAddOnFlow.tsx | 1 - .../home/app-dashboard/app-view/tabs/Webhooks.tsx | 1 - .../app-view/tabs/activity-feed/ActivityFeed.tsx | 1 - .../events/focus-views/EventFocusView.tsx | 1 - .../home/app-dashboard/expanded-app/GHABanner.tsx | 3 +-- .../expanded-app/metrics/AreaChart.tsx | 1 - .../expanded-app/metrics/MetricsChart.tsx | 2 +- .../expanded-app/metrics/StackedAreaChart.tsx | 1 - .../validate-apply/app-settings/EnvGroups.tsx | 1 - .../app-dashboard/validate-apply/jobs/utils.ts | 2 -- .../app-dashboard/validate-apply/logs/Logs.tsx | 1 - .../services-settings/ServiceContainer.tsx | 1 - .../services-settings/footers/JobFooter.tsx | 1 - .../footers/ServiceStatusFooter.tsx | 1 - .../home/cluster-dashboard/NamespaceSelector.tsx | 2 +- .../home/cluster-dashboard/apps/AppDashboard.tsx | 1 - .../main/home/cluster-dashboard/chart/Chart.tsx | 3 --- .../home/cluster-dashboard/chart/ChartList.tsx | 1 - .../home/cluster-dashboard/chart/JobRunTable.tsx | 4 +--- .../dashboard/ClusterSettings.tsx | 2 +- .../home/cluster-dashboard/dashboard/Routes.tsx | 2 +- .../cluster-dashboard/env-groups/EnvGroup.tsx | 1 - .../env-groups/EnvGroupDashboard.tsx | 4 ++-- .../cluster-dashboard/env-groups/EnvGroupList.tsx | 2 +- .../env-groups/ExpandedEnvGroup.tsx | 3 +-- .../env-groups/ExpandedEnvGroupDashboard.tsx | 5 ++--- .../expanded-chart/ExpandedChart.tsx | 1 - .../expanded-chart/ExpandedChartWrapper.tsx | 1 - .../preview-environments/v2/setup-app/Addons.tsx | 1 - .../v2/setup-app/CreateTemplate.tsx | 1 - .../v2/setup-app/PreviewAppDataContainer.tsx | 1 - .../v2/setup-app/ServiceSettings.tsx | 1 - .../src/main/home/dashboard/OldClusterList.tsx | 2 -- .../src/main/home/env-dashboard/EnvGroup.tsx | 1 - .../home/env-dashboard/tabs/SyncedAppsTab.tsx | 4 ---- .../infrastructure-dashboard/ClusterStatus.tsx | 1 - .../home/integrations/GitlabIntegrationList.tsx | 3 +-- .../create-integration/CreateIntegrationForm.tsx | 1 - dashboard/src/main/home/launch/Launch.tsx | 2 -- dashboard/src/main/home/launch/LaunchWrapper.tsx | 2 +- dashboard/src/main/home/launch/TemplateList.tsx | 3 +-- .../main/home/launch/launch-flow/SourcePage.tsx | 1 - .../main/home/modals/ClusterInstructionsModal.tsx | 1 - .../home/modals/EditInviteOrCollaboratorModal.tsx | 1 - dashboard/src/main/home/modals/EnvEditorModal.tsx | 2 -- .../home/modals/IntegrationsInstructionsModal.tsx | 1 - .../src/main/home/modals/IntegrationsModal.tsx | 1 - dashboard/src/main/home/modals/NamespaceModal.tsx | 1 - .../home/modals/RedirectToOnboardingModal.tsx | 5 +---- .../main/home/modals/SkipProvisioningModal.tsx | 1 - .../src/main/home/modals/UpdateClusterModal.tsx | 3 --- .../src/main/home/modals/UpgradeChartModal.tsx | 2 -- .../src/main/home/new-project/NewProject.tsx | 1 - dashboard/src/main/home/onboarding/Onboarding.tsx | 6 ------ .../onboarding/components/ProviderSelector.tsx | 2 +- .../ConnectRegistry/forms/_AWSRegistryForm.tsx | 1 - .../main/home/onboarding/steps/ConnectSource.tsx | 3 --- .../home/project-settings/APITokensSection.tsx | 2 +- .../src/main/home/project-settings/Metadata.tsx | 6 ------ .../home/project-settings/PermissionGroup.tsx | 1 - .../project-settings/ProjectDeleteConsent.tsx | 3 --- .../home/project-settings/ProjectSettings.tsx | 4 +--- .../api-tokens/CreateAPITokenForm.tsx | 7 +------ .../api-tokens/CustomPolicyForm.tsx | 15 +-------------- .../src/main/home/provisioner/AWSFormSection.tsx | 2 +- .../main/home/provisioner/AzureFormSection.tsx | 7 +------ .../src/main/home/provisioner/DOFormSection.tsx | 3 +-- .../home/provisioner/ExistingClusterSection.tsx | 2 -- .../src/main/home/provisioner/GCPFormSection.tsx | 2 +- .../main/home/provisioner/ProvisionerSettings.tsx | 1 - .../home/sidebar/AddCluster/AWSCredentialForm.tsx | 4 +--- .../home/sidebar/AddCluster/AWSCredentialList.tsx | 3 --- .../home/sidebar/AddCluster/CredentialList.tsx | 1 - .../main/home/sidebar/ProvisionClusterModal.tsx | 3 --- dashboard/src/shared/hooks/useOutsideAlerter.ts | 2 +- dashboard/src/test-utils.tsx | 3 +-- 129 files changed, 63 insertions(+), 254 deletions(-) diff --git a/dashboard/src/App.tsx b/dashboard/src/App.tsx index 146919cfbd..59d786e771 100644 --- a/dashboard/src/App.tsx +++ b/dashboard/src/App.tsx @@ -4,7 +4,6 @@ import { BrowserRouter } from "react-router-dom"; import styled, { createGlobalStyle, ThemeProvider } from "styled-components"; import PorterErrorBoundary from "shared/error_handling/PorterErrorBoundary"; -import midnight from "shared/themes/midnight"; import standard from "shared/themes/standard"; import MainWrapper from "./main/MainWrapper"; diff --git a/dashboard/src/components/AWSCostConsent.tsx b/dashboard/src/components/AWSCostConsent.tsx index d4e71509d9..cdeef8658e 100644 --- a/dashboard/src/components/AWSCostConsent.tsx +++ b/dashboard/src/components/AWSCostConsent.tsx @@ -1,8 +1,6 @@ -import React, { useContext, useState } from "react"; +import React, { useState } from "react"; import styled from "styled-components"; -import api from "shared/api"; -import { Context } from "shared/Context"; import Button from "./porter/Button"; import ExpandableSection from "./porter/ExpandableSection"; diff --git a/dashboard/src/components/AzureCredentialForm.tsx b/dashboard/src/components/AzureCredentialForm.tsx index e3500ee3d6..58ce2d3098 100644 --- a/dashboard/src/components/AzureCredentialForm.tsx +++ b/dashboard/src/components/AzureCredentialForm.tsx @@ -1,6 +1,5 @@ -import React, { useContext, useEffect, useMemo, useState } from "react"; +import React, { useContext, useState } from "react"; import styled from "styled-components"; -import { v4 as uuidv4 } from "uuid"; import api from "shared/api"; import { Context } from "shared/Context"; diff --git a/dashboard/src/components/Breadcrumb.tsx b/dashboard/src/components/Breadcrumb.tsx index 8f94007885..e0dbcf8eac 100644 --- a/dashboard/src/components/Breadcrumb.tsx +++ b/dashboard/src/components/Breadcrumb.tsx @@ -1,7 +1,6 @@ -import React, { Fragment, useState } from "react"; +import React, { Fragment } from "react"; import styled from "styled-components"; -import { Steps } from "main/home/onboarding/types"; type Props = { currentStep: string; diff --git a/dashboard/src/components/CloudFormationForm.tsx b/dashboard/src/components/CloudFormationForm.tsx index ae862fd1e7..a68f3883af 100644 --- a/dashboard/src/components/CloudFormationForm.tsx +++ b/dashboard/src/components/CloudFormationForm.tsx @@ -5,7 +5,6 @@ import { v4 as uuidv4 } from "uuid"; import api from "shared/api"; import { Context } from "shared/Context"; -import theme from "shared/themes/midnight"; import aws from "assets/aws.png"; import cloudformationStatus from "assets/cloud-formation-stack-complete.png"; diff --git a/dashboard/src/components/ClusterProvisioningPlaceholder.tsx b/dashboard/src/components/ClusterProvisioningPlaceholder.tsx index e0365d9bea..0588536aa4 100644 --- a/dashboard/src/components/ClusterProvisioningPlaceholder.tsx +++ b/dashboard/src/components/ClusterProvisioningPlaceholder.tsx @@ -1,9 +1,7 @@ -import React, { useContext, useEffect, useState } from "react"; +import React, { useContext } from "react"; import { withRouter, type RouteComponentProps } from "react-router"; import styled from "styled-components"; -import Heading from "components/form-components/Heading"; -import Helper from "components/form-components/Helper"; import PorterLink from "components/porter/Link"; import { Context } from "shared/Context"; diff --git a/dashboard/src/components/CredentialsForm.tsx b/dashboard/src/components/CredentialsForm.tsx index c679a61095..e41ffe20dc 100644 --- a/dashboard/src/components/CredentialsForm.tsx +++ b/dashboard/src/components/CredentialsForm.tsx @@ -1,7 +1,6 @@ -import React, { useContext, useEffect, useMemo, useState } from "react"; +import React, { useContext, useEffect, useState } from "react"; import styled from "styled-components"; -import Heading from "components/form-components/Heading"; import Button from "components/porter/Button"; import api from "shared/api"; @@ -10,11 +9,8 @@ import addCircle from "assets/add-circle.png"; import aws from "assets/aws.png"; import credsIcon from "assets/creds.png"; -import Helper from "./form-components/Helper"; import InputRow from "./form-components/InputRow"; import Loading from "./Loading"; -import Error from "./porter/Error"; -import Modal from "./porter/Modal"; import Spacer from "./porter/Spacer"; import Text from "./porter/Text"; import SaveButton from "./SaveButton"; diff --git a/dashboard/src/components/ExpandableResource.tsx b/dashboard/src/components/ExpandableResource.tsx index abc8698207..75b0cef441 100644 --- a/dashboard/src/components/ExpandableResource.tsx +++ b/dashboard/src/components/ExpandableResource.tsx @@ -1,4 +1,4 @@ -import React, { Component, useContext, useEffect } from "react"; +import React, { useContext } from "react"; import styled from "styled-components"; import { baseApi } from "shared/baseApi"; diff --git a/dashboard/src/components/GCPCostConsent.tsx b/dashboard/src/components/GCPCostConsent.tsx index 26dfa6709b..8ca9b3ff5e 100644 --- a/dashboard/src/components/GCPCostConsent.tsx +++ b/dashboard/src/components/GCPCostConsent.tsx @@ -1,8 +1,6 @@ -import React, { useContext, useState } from "react"; +import React, { useState } from "react"; import styled from "styled-components"; -import api from "shared/api"; -import { Context } from "shared/Context"; import Button from "./porter/Button"; import ExpandableSection from "./porter/ExpandableSection"; diff --git a/dashboard/src/components/GCPCredentialsForm.tsx b/dashboard/src/components/GCPCredentialsForm.tsx index b144d43dd1..3b1e746b63 100644 --- a/dashboard/src/components/GCPCredentialsForm.tsx +++ b/dashboard/src/components/GCPCredentialsForm.tsx @@ -1,13 +1,9 @@ import React, { useContext, useEffect, useState } from "react"; import styled from "styled-components"; -import Helper from "components/form-components/Helper"; import UploadArea from "components/form-components/UploadArea"; -import Loading from "components/Loading"; -import Placeholder from "components/OldPlaceholder"; import Button from "components/porter/Button"; import Text from "components/porter/Text"; -import { Flex } from "main/home/cluster-dashboard/stacks/components/styles"; import api from "shared/api"; import { Context } from "shared/Context"; diff --git a/dashboard/src/components/GCPProvisionerSettings.tsx b/dashboard/src/components/GCPProvisionerSettings.tsx index ccaada7793..034a9c932d 100644 --- a/dashboard/src/components/GCPProvisionerSettings.tsx +++ b/dashboard/src/components/GCPProvisionerSettings.tsx @@ -1,4 +1,3 @@ -import { log } from "console"; import React, { useContext, useEffect, useState } from "react"; import { Cluster, @@ -16,7 +15,6 @@ import { withRouter, type RouteComponentProps } from "react-router"; import styled from "styled-components"; import Heading from "components/form-components/Heading"; -import Helper from "components/form-components/Helper"; import SelectRow from "components/form-components/SelectRow"; import Loading from "components/Loading"; import { OFState } from "main/home/onboarding/state"; @@ -26,20 +24,13 @@ import api from "shared/api"; import { Context } from "shared/Context"; import { pushFiltered } from "shared/routing"; import { type ClusterType } from "shared/types"; -import failure from "assets/failure.svg"; -import healthy from "assets/status-healthy.png"; import InputRow from "./form-components/InputRow"; -import Placeholder from "./Placeholder"; import Button from "./porter/Button"; import Error from "./porter/Error"; -import ExpandableSection from "./porter/ExpandableSection"; -import Fieldset from "./porter/Fieldset"; import InputSlider from "./porter/InputSlider"; -import Link from "./porter/Link"; import Select from "./porter/Select"; import Spacer from "./porter/Spacer"; -import Step from "./porter/Step"; import Text from "./porter/Text"; import VerticalSteps from "./porter/VerticalSteps"; import PreflightChecks from "./PreflightChecks"; diff --git a/dashboard/src/components/GPUCostConsent.tsx b/dashboard/src/components/GPUCostConsent.tsx index 4695150066..e9eb2a6758 100644 --- a/dashboard/src/components/GPUCostConsent.tsx +++ b/dashboard/src/components/GPUCostConsent.tsx @@ -1,15 +1,12 @@ -import React, { useContext, useState } from "react"; +import React, { useState } from "react"; import styled from "styled-components"; -import api from "shared/api"; -import { Context } from "shared/Context"; import Button from "./porter/Button"; import ExpandableSection from "./porter/ExpandableSection"; import Fieldset from "./porter/Fieldset"; import Input from "./porter/Input"; import Link from "./porter/Link"; -import Modal from "./porter/Modal"; import Spacer from "./porter/Spacer"; import Text from "./porter/Text"; diff --git a/dashboard/src/components/LogSearchBar.tsx b/dashboard/src/components/LogSearchBar.tsx index 74645b4782..f9e43f4eaa 100644 --- a/dashboard/src/components/LogSearchBar.tsx +++ b/dashboard/src/components/LogSearchBar.tsx @@ -1,8 +1,5 @@ -import React, { useState } from "react"; -import dayjs from "dayjs"; -import styled from "styled-components"; +import React from "react"; -import Button from "./Button"; import SearchBar from "./porter/SearchBar"; type Props = { diff --git a/dashboard/src/components/OldTable.tsx b/dashboard/src/components/OldTable.tsx index 4d9f7ee01f..c237cbe9cd 100644 --- a/dashboard/src/components/OldTable.tsx +++ b/dashboard/src/components/OldTable.tsx @@ -12,7 +12,6 @@ import Loading from "components/Loading"; import loading from "assets/loading.gif"; -import Button from "./porter/Button"; import Selector from "./Selector"; const GlobalFilter: React.FunctionComponent = ({ diff --git a/dashboard/src/components/PreflightChecks.tsx b/dashboard/src/components/PreflightChecks.tsx index 243792e6b9..720ef96ab6 100644 --- a/dashboard/src/components/PreflightChecks.tsx +++ b/dashboard/src/components/PreflightChecks.tsx @@ -1,4 +1,4 @@ -import React, { useContext, useEffect, useState } from "react"; +import React, { useState } from "react"; import { withRouter, type RouteComponentProps } from "react-router"; import styled from "styled-components"; diff --git a/dashboard/src/components/ProvisionerFlow.tsx b/dashboard/src/components/ProvisionerFlow.tsx index d8cefc01d0..afdb74544f 100644 --- a/dashboard/src/components/ProvisionerFlow.tsx +++ b/dashboard/src/components/ProvisionerFlow.tsx @@ -1,10 +1,9 @@ -import React, { useContext, useMemo, useState } from "react"; +import React, { useContext, useState } from "react"; import styled from "styled-components"; import AzureCredentialForm from "components/AzureCredentialForm"; import CloudFormationForm from "components/CloudFormationForm"; import CredentialsForm from "components/CredentialsForm"; -import Helper from "components/form-components/Helper"; import GCPCredentialsForm from "components/GCPCredentialsForm"; import ProvisionerForm from "components/ProvisionerForm"; diff --git a/dashboard/src/components/ProvisionerForm.tsx b/dashboard/src/components/ProvisionerForm.tsx index a02ca3dbc4..6bff37aec8 100644 --- a/dashboard/src/components/ProvisionerForm.tsx +++ b/dashboard/src/components/ProvisionerForm.tsx @@ -1,14 +1,12 @@ -import React, { useContext, useEffect, useState } from "react"; +import React from "react"; import styled from "styled-components"; -import Heading from "components/form-components/Heading"; import aws from "assets/aws.png"; import azure from "assets/azure.png"; import gcp from "assets/gcp.png"; import AzureProvisionerSettings from "./AzureProvisionerSettings"; -import Helper from "./form-components/Helper"; import GCPProvisionerSettings from "./GCPProvisionerSettings"; import Container from "./porter/Container"; import Spacer from "./porter/Spacer"; diff --git a/dashboard/src/components/ProvisionerSettings.tsx b/dashboard/src/components/ProvisionerSettings.tsx index 0d0155f03f..48aa23288f 100644 --- a/dashboard/src/components/ProvisionerSettings.tsx +++ b/dashboard/src/components/ProvisionerSettings.tsx @@ -19,7 +19,6 @@ import { } from "@porter-dev/api-contracts"; import { withRouter, type RouteComponentProps } from "react-router"; import styled from "styled-components"; -import { Integer } from "type-fest"; import Heading from "components/form-components/Heading"; import SelectRow from "components/form-components/SelectRow"; @@ -40,7 +39,6 @@ import Button from "./porter/Button"; import Checkbox from "./porter/Checkbox"; import Icon from "./porter/Icon"; import Input from "./porter/Input"; -import InputSlider from "./porter/InputSlider"; import Select from "./porter/Select"; import Spacer from "./porter/Spacer"; import Text from "./porter/Text"; diff --git a/dashboard/src/components/ProvisionerStatus.tsx b/dashboard/src/components/ProvisionerStatus.tsx index e9a057ed07..a8b8c6ae49 100644 --- a/dashboard/src/components/ProvisionerStatus.tsx +++ b/dashboard/src/components/ProvisionerStatus.tsx @@ -1,4 +1,4 @@ -import React, { useContext, useEffect, useRef, useState } from "react"; +import React, { useContext, useEffect, useState } from "react"; import styled, { keyframes } from "styled-components"; import api from "shared/api"; diff --git a/dashboard/src/components/SaveButton.tsx b/dashboard/src/components/SaveButton.tsx index fcc2d188dc..b6d6a41648 100644 --- a/dashboard/src/components/SaveButton.tsx +++ b/dashboard/src/components/SaveButton.tsx @@ -1,4 +1,4 @@ -import React, { Component } from "react"; +import React from "react"; import styled from "styled-components"; import loading from "assets/loading.gif"; diff --git a/dashboard/src/components/date-time-picker/DateTimePicker.tsx b/dashboard/src/components/date-time-picker/DateTimePicker.tsx index 01adf6eb4a..450440d2c1 100644 --- a/dashboard/src/components/date-time-picker/DateTimePicker.tsx +++ b/dashboard/src/components/date-time-picker/DateTimePicker.tsx @@ -1,8 +1,7 @@ -import React, { useState } from "react"; +import React from "react"; import DatePicker from "react-datepicker"; import styled from "styled-components"; -import time from "assets/time.svg"; import "./react-datepicker.css"; diff --git a/dashboard/src/components/form-components/Helper.tsx b/dashboard/src/components/form-components/Helper.tsx index 7d41eb9919..190631453f 100644 --- a/dashboard/src/components/form-components/Helper.tsx +++ b/dashboard/src/components/form-components/Helper.tsx @@ -1,4 +1,3 @@ -import React from "react"; import styled from "styled-components"; export const Helper = styled.div<{ color?: string }>` diff --git a/dashboard/src/components/form-components/SelectRow.tsx b/dashboard/src/components/form-components/SelectRow.tsx index 1385200f50..a6c81dafd5 100644 --- a/dashboard/src/components/form-components/SelectRow.tsx +++ b/dashboard/src/components/form-components/SelectRow.tsx @@ -1,4 +1,4 @@ -import React, { Component } from "react"; +import React from "react"; import styled from "styled-components"; import Selector, { type SelectorPropsType } from "../Selector"; diff --git a/dashboard/src/components/porter-form/field-components/CronInput.tsx b/dashboard/src/components/porter-form/field-components/CronInput.tsx index ae38fb89d7..9954919e60 100644 --- a/dashboard/src/components/porter-form/field-components/CronInput.tsx +++ b/dashboard/src/components/porter-form/field-components/CronInput.tsx @@ -3,7 +3,6 @@ import { isValidCron } from "cron-validator"; import CronParser from "cronstrue"; import styled from "styled-components"; -import DocsHelper from "components/DocsHelper"; import DynamicLink from "components/DynamicLink"; import InputRow from "components/form-components/InputRow"; diff --git a/dashboard/src/components/porter-form/field-components/Dictionary.tsx b/dashboard/src/components/porter-form/field-components/Dictionary.tsx index 8878dd1f8d..6edd32857d 100644 --- a/dashboard/src/components/porter-form/field-components/Dictionary.tsx +++ b/dashboard/src/components/porter-form/field-components/Dictionary.tsx @@ -1,8 +1,7 @@ -import React, { useEffect } from "react"; +import React from "react"; import DictionaryEditor from "components/porter/DictionaryEditor"; -import InputRow from "../../form-components/InputRow"; import useFormField from "../hooks/useFormField"; import { type DictionaryField, diff --git a/dashboard/src/components/porter-form/field-components/KeyValueArray.tsx b/dashboard/src/components/porter-form/field-components/KeyValueArray.tsx index 6d317f931b..7a987d73cc 100644 --- a/dashboard/src/components/porter-form/field-components/KeyValueArray.tsx +++ b/dashboard/src/components/porter-form/field-components/KeyValueArray.tsx @@ -1,5 +1,5 @@ import React, { useContext, useEffect, useState } from "react"; -import _, { differenceBy, isObject, omit } from "lodash"; +import { differenceBy, isObject, omit } from "lodash"; import styled, { keyframes } from "styled-components"; import Heading from "components/form-components/Heading"; diff --git a/dashboard/src/components/porter-form/utils.ts b/dashboard/src/components/porter-form/utils.ts index 5d3c9a5525..50ae6bc7d5 100644 --- a/dashboard/src/components/porter-form/utils.ts +++ b/dashboard/src/components/porter-form/utils.ts @@ -1,6 +1,5 @@ -import { merge, unionBy } from "lodash"; +import { unionBy } from "lodash"; -import { KeyValueType } from "main/home/cluster-dashboard/env-groups/EnvGroupArray"; import { type GenericInputField } from "./types"; diff --git a/dashboard/src/components/porter/Banner.tsx b/dashboard/src/components/porter/Banner.tsx index f948df38c5..05d8aa55cd 100644 --- a/dashboard/src/components/porter/Banner.tsx +++ b/dashboard/src/components/porter/Banner.tsx @@ -2,7 +2,6 @@ import React from "react"; import styled from "styled-components"; import info from "assets/info.svg"; -import warning from "assets/warning.png"; type Props = { type?: string; diff --git a/dashboard/src/components/porter/Button.tsx b/dashboard/src/components/porter/Button.tsx index f427857acd..533cfb6ac1 100644 --- a/dashboard/src/components/porter/Button.tsx +++ b/dashboard/src/components/porter/Button.tsx @@ -1,4 +1,4 @@ -import React, { useEffect, useState } from "react"; +import React from "react"; import styled, { keyframes } from "styled-components"; import loading from "assets/loading.gif"; diff --git a/dashboard/src/components/porter/ClickToCopy.tsx b/dashboard/src/components/porter/ClickToCopy.tsx index 21d08b9ac3..91be7ebdca 100644 --- a/dashboard/src/components/porter/ClickToCopy.tsx +++ b/dashboard/src/components/porter/ClickToCopy.tsx @@ -1,4 +1,4 @@ -import React, { useEffect, useState } from "react"; +import React, { useState } from "react"; import styled from "styled-components"; import check from "assets/check.svg"; diff --git a/dashboard/src/components/porter/Clickable.tsx b/dashboard/src/components/porter/Clickable.tsx index c16b2a80ce..aaa3d2253e 100644 --- a/dashboard/src/components/porter/Clickable.tsx +++ b/dashboard/src/components/porter/Clickable.tsx @@ -1,7 +1,6 @@ import React from "react"; import styled from "styled-components"; -import Container from "./Container"; type Props = { children: React.ReactNode; diff --git a/dashboard/src/components/porter/DictionaryEditor.tsx b/dashboard/src/components/porter/DictionaryEditor.tsx index 3fb5912aa6..10a0049884 100644 --- a/dashboard/src/components/porter/DictionaryEditor.tsx +++ b/dashboard/src/components/porter/DictionaryEditor.tsx @@ -1,8 +1,6 @@ -import { ok } from "assert"; import React, { useEffect, useState } from "react"; import styled from "styled-components"; -import Container from "./Container"; import Spacer from "./Spacer"; import Text from "./Text"; diff --git a/dashboard/src/components/porter/Dropdown.tsx b/dashboard/src/components/porter/Dropdown.tsx index a215b834c6..673e414539 100644 --- a/dashboard/src/components/porter/Dropdown.tsx +++ b/dashboard/src/components/porter/Dropdown.tsx @@ -1,11 +1,9 @@ import React, { type ReactNode } from "react"; import { AnimatePresence, motion } from "framer-motion"; -import styled, { keyframes } from "styled-components"; +import styled from "styled-components"; import Container from "./Container"; import Spacer from "./Spacer"; -import Tag from "./Tag"; -import Text from "./Text"; type Props = { key: string; diff --git a/dashboard/src/components/porter/ExpandableSection.tsx b/dashboard/src/components/porter/ExpandableSection.tsx index d4f66767cb..f1fa9ae389 100644 --- a/dashboard/src/components/porter/ExpandableSection.tsx +++ b/dashboard/src/components/porter/ExpandableSection.tsx @@ -1,4 +1,4 @@ -import React, { useEffect, useState } from "react"; +import React, { useState } from "react"; import styled from "styled-components"; import CopyToClipboard from "components/CopyToClipboard"; diff --git a/dashboard/src/components/porter/Fieldset.tsx b/dashboard/src/components/porter/Fieldset.tsx index c6fd6a8723..a39af3ef12 100644 --- a/dashboard/src/components/porter/Fieldset.tsx +++ b/dashboard/src/components/porter/Fieldset.tsx @@ -1,4 +1,4 @@ -import React, { useEffect, useState } from "react"; +import React from "react"; import styled from "styled-components"; type Props = { diff --git a/dashboard/src/components/porter/Input.tsx b/dashboard/src/components/porter/Input.tsx index 67fdacd302..9291385a31 100644 --- a/dashboard/src/components/porter/Input.tsx +++ b/dashboard/src/components/porter/Input.tsx @@ -1,6 +1,5 @@ -import React, { useEffect, useState } from "react"; +import React from "react"; import styled from "styled-components"; -import { boolean } from "zod"; import Tooltip from "./Tooltip"; diff --git a/dashboard/src/components/porter/InputSlider.tsx b/dashboard/src/components/porter/InputSlider.tsx index a57366f0e7..623cb6e624 100644 --- a/dashboard/src/components/porter/InputSlider.tsx +++ b/dashboard/src/components/porter/InputSlider.tsx @@ -1,12 +1,10 @@ -import React, { useEffect, useState } from "react"; +import React, { useState } from "react"; import Slider, { type Mark } from "@material-ui/core/Slider"; import { withStyles } from "@material-ui/core/styles"; import Tooltip from "@material-ui/core/Tooltip"; -import Typography from "@material-ui/core/Typography"; import styled from "styled-components"; import Spacer from "./Spacer"; -import Text from "./Text"; type InputSliderProps = { label?: string; diff --git a/dashboard/src/components/porter/Modal.tsx b/dashboard/src/components/porter/Modal.tsx index 531c6c0369..91a8df786d 100644 --- a/dashboard/src/components/porter/Modal.tsx +++ b/dashboard/src/components/porter/Modal.tsx @@ -1,4 +1,4 @@ -import React, { useEffect, useState } from "react"; +import React from "react"; import { createPortal } from "react-dom"; import styled from "styled-components"; diff --git a/dashboard/src/components/porter/Pagination.tsx b/dashboard/src/components/porter/Pagination.tsx index f86331ced1..849bb8459a 100644 --- a/dashboard/src/components/porter/Pagination.tsx +++ b/dashboard/src/components/porter/Pagination.tsx @@ -1,5 +1,4 @@ import React from "react"; -import styled from "styled-components"; import Button from "./Button"; import Container from "./Container"; diff --git a/dashboard/src/components/porter/SearchBar.tsx b/dashboard/src/components/porter/SearchBar.tsx index dce6e7d9f5..8a4dee8433 100644 --- a/dashboard/src/components/porter/SearchBar.tsx +++ b/dashboard/src/components/porter/SearchBar.tsx @@ -1,4 +1,4 @@ -import React, { useEffect, useState } from "react"; +import React from "react"; import styled from "styled-components"; import search from "assets/search.png"; diff --git a/dashboard/src/components/porter/Spacer.tsx b/dashboard/src/components/porter/Spacer.tsx index 963f3e6e51..7251d1c427 100644 --- a/dashboard/src/components/porter/Spacer.tsx +++ b/dashboard/src/components/porter/Spacer.tsx @@ -1,4 +1,4 @@ -import React, { useEffect, useState } from "react"; +import React from "react"; import styled from "styled-components"; type Props = { diff --git a/dashboard/src/components/porter/Step.tsx b/dashboard/src/components/porter/Step.tsx index fb6eb25017..d8adb9b644 100644 --- a/dashboard/src/components/porter/Step.tsx +++ b/dashboard/src/components/porter/Step.tsx @@ -1,4 +1,4 @@ -import React, { useEffect, useState } from "react"; +import React from "react"; import styled from "styled-components"; import Container from "./Container"; diff --git a/dashboard/src/components/porter/Text.tsx b/dashboard/src/components/porter/Text.tsx index 87d157cdc6..b86a79255f 100644 --- a/dashboard/src/components/porter/Text.tsx +++ b/dashboard/src/components/porter/Text.tsx @@ -1,4 +1,4 @@ -import React, { useEffect, useState } from "react"; +import React from "react"; import styled from "styled-components"; type Props = { diff --git a/dashboard/src/components/porter/VerticalSteps.tsx b/dashboard/src/components/porter/VerticalSteps.tsx index ca2140325b..5772558a88 100644 --- a/dashboard/src/components/porter/VerticalSteps.tsx +++ b/dashboard/src/components/porter/VerticalSteps.tsx @@ -1,12 +1,9 @@ -import React, { useEffect, useState } from "react"; +import React, { useState } from "react"; import AnimateHeight from "react-animate-height"; import styled from "styled-components"; import check from "assets/check.png"; -import Button from "./Button"; -import Container from "./Container"; -import Spacer from "./Spacer"; type Props = { steps: React.ReactNode[]; diff --git a/dashboard/src/components/repo-selector/RepoList.tsx b/dashboard/src/components/repo-selector/RepoList.tsx index 12bbdb2d9f..e64d47f929 100644 --- a/dashboard/src/components/repo-selector/RepoList.tsx +++ b/dashboard/src/components/repo-selector/RepoList.tsx @@ -2,7 +2,6 @@ import React, { useContext, useEffect, useRef, useState } from "react"; import styled from "styled-components"; import DynamicLink from "components/DynamicLink"; -import Text from "components/porter/Text"; import api from "shared/api"; import { Context } from "shared/Context"; @@ -10,7 +9,6 @@ import { useOutsideAlerter } from "shared/hooks/useOutsideAlerter"; import { type ActionConfigType, type RepoType } from "shared/types"; import github from "assets/github-white.png"; -import { search } from "../../shared/search"; import Loading from "../Loading"; import SearchBar from "../SearchBar"; diff --git a/dashboard/src/lib/hooks/useJobs.ts b/dashboard/src/lib/hooks/useJobs.ts index 7f3ed3ed45..b447f7b11a 100644 --- a/dashboard/src/lib/hooks/useJobs.ts +++ b/dashboard/src/lib/hooks/useJobs.ts @@ -1,6 +1,5 @@ import { useEffect, useState } from "react"; import { useQuery } from "@tanstack/react-query"; -import _ from "lodash"; import { z } from "zod"; import api from "shared/api"; diff --git a/dashboard/src/main/auth/InfoPanel.tsx b/dashboard/src/main/auth/InfoPanel.tsx index 7340654d03..adf9172869 100644 --- a/dashboard/src/main/auth/InfoPanel.tsx +++ b/dashboard/src/main/auth/InfoPanel.tsx @@ -1,4 +1,4 @@ -import React, { useState } from "react"; +import React from "react"; import styled from "styled-components"; import Container from "components/porter/Container"; diff --git a/dashboard/src/main/auth/SetInfo.tsx b/dashboard/src/main/auth/SetInfo.tsx index c11e5349fe..8b185db8fa 100644 --- a/dashboard/src/main/auth/SetInfo.tsx +++ b/dashboard/src/main/auth/SetInfo.tsx @@ -11,8 +11,6 @@ import Text from "components/porter/Text"; import api from "shared/api"; import { Context } from "shared/Context"; -import { emailRegex } from "shared/regex"; -import github from "assets/github-icon.png"; import GoogleIcon from "assets/GoogleIcon"; import logo from "assets/logo.png"; diff --git a/dashboard/src/main/auth/VerifyEmail.tsx b/dashboard/src/main/auth/VerifyEmail.tsx index cbdb3c234f..2d9a395dec 100644 --- a/dashboard/src/main/auth/VerifyEmail.tsx +++ b/dashboard/src/main/auth/VerifyEmail.tsx @@ -3,15 +3,12 @@ import styled from "styled-components"; import Heading from "components/form-components/Heading"; import Button from "components/porter/Button"; -import Container from "components/porter/Container"; -import Input from "components/porter/Input"; import Link from "components/porter/Link"; import Spacer from "components/porter/Spacer"; import Text from "components/porter/Text"; import api from "shared/api"; import { Context } from "shared/Context"; -import github from "assets/github-icon.png"; import GoogleIcon from "assets/GoogleIcon"; import logo from "assets/logo.png"; diff --git a/dashboard/src/main/home/add-on-dashboard/AddOnDashboard.tsx b/dashboard/src/main/home/add-on-dashboard/AddOnDashboard.tsx index 425e7fb128..def6993bb6 100644 --- a/dashboard/src/main/home/add-on-dashboard/AddOnDashboard.tsx +++ b/dashboard/src/main/home/add-on-dashboard/AddOnDashboard.tsx @@ -1,5 +1,4 @@ import React, { useContext, useMemo, useState } from "react"; -import _ from "lodash"; import { Link } from "react-router-dom"; import styled from "styled-components"; diff --git a/dashboard/src/main/home/add-on-dashboard/ConfigureTemplate.tsx b/dashboard/src/main/home/add-on-dashboard/ConfigureTemplate.tsx index 7e86b72865..220c75de45 100644 --- a/dashboard/src/main/home/add-on-dashboard/ConfigureTemplate.tsx +++ b/dashboard/src/main/home/add-on-dashboard/ConfigureTemplate.tsx @@ -1,6 +1,5 @@ -import React, { useContext, useEffect, useMemo, useState } from "react"; +import React, { useContext, useState } from "react"; import _ from "lodash"; -import { generateSlug } from "random-word-slugs"; import { withRouter, type RouteComponentProps } from "react-router"; import styled from "styled-components"; diff --git a/dashboard/src/main/home/add-on-dashboard/ExpandedTemplate.tsx b/dashboard/src/main/home/add-on-dashboard/ExpandedTemplate.tsx index 1802c691dc..5af7733647 100644 --- a/dashboard/src/main/home/add-on-dashboard/ExpandedTemplate.tsx +++ b/dashboard/src/main/home/add-on-dashboard/ExpandedTemplate.tsx @@ -1,12 +1,10 @@ -import React, { useContext, useEffect, useMemo, useState } from "react"; -import _ from "lodash"; +import React, { useContext, useEffect, useState } from "react"; import Markdown from "markdown-to-jsx"; import styled from "styled-components"; import Loading from "components/Loading"; import Button from "components/porter/Button"; import Container from "components/porter/Container"; -import Icon from "components/porter/Icon"; import Spacer from "components/porter/Spacer"; import Text from "components/porter/Text"; diff --git a/dashboard/src/main/home/add-on-dashboard/legacy_AddOnDashboard.tsx b/dashboard/src/main/home/add-on-dashboard/legacy_AddOnDashboard.tsx index d335d0f5a7..253f98abdb 100644 --- a/dashboard/src/main/home/add-on-dashboard/legacy_AddOnDashboard.tsx +++ b/dashboard/src/main/home/add-on-dashboard/legacy_AddOnDashboard.tsx @@ -17,11 +17,9 @@ import DashboardPlaceholder from "components/porter/DashboardPlaceholder"; import Fieldset from "components/porter/Fieldset"; import PorterLink from "components/porter/Link"; import SearchBar from "components/porter/SearchBar"; -import ShowIntercomButton from "components/porter/ShowIntercomButton"; import Spacer from "components/porter/Spacer"; import Text from "components/porter/Text"; import Toggle from "components/porter/Toggle"; -import { useAuthState } from "main/auth/context"; import { useDefaultDeploymentTarget } from "lib/hooks/useDeploymentTarget"; import api from "shared/api"; diff --git a/dashboard/src/main/home/add-on-dashboard/legacy_NewAddOnFlow.tsx b/dashboard/src/main/home/add-on-dashboard/legacy_NewAddOnFlow.tsx index 855ad8e998..a7b851c947 100644 --- a/dashboard/src/main/home/add-on-dashboard/legacy_NewAddOnFlow.tsx +++ b/dashboard/src/main/home/add-on-dashboard/legacy_NewAddOnFlow.tsx @@ -8,7 +8,6 @@ import Back from "components/porter/Back"; import Container from "components/porter/Container"; import Fieldset from "components/porter/Fieldset"; import SearchBar from "components/porter/SearchBar"; -import Select from "components/porter/Select"; import Spacer from "components/porter/Spacer"; import Text from "components/porter/Text"; diff --git a/dashboard/src/main/home/app-dashboard/app-view/tabs/Webhooks.tsx b/dashboard/src/main/home/app-dashboard/app-view/tabs/Webhooks.tsx index 271de03965..17c0473053 100644 --- a/dashboard/src/main/home/app-dashboard/app-view/tabs/Webhooks.tsx +++ b/dashboard/src/main/home/app-dashboard/app-view/tabs/Webhooks.tsx @@ -1,4 +1,3 @@ -import { url } from "inspector"; import React, { useEffect, useState } from "react"; import styled from "styled-components"; diff --git a/dashboard/src/main/home/app-dashboard/app-view/tabs/activity-feed/ActivityFeed.tsx b/dashboard/src/main/home/app-dashboard/app-view/tabs/activity-feed/ActivityFeed.tsx index 5c8ba70a01..a67162573a 100644 --- a/dashboard/src/main/home/app-dashboard/app-view/tabs/activity-feed/ActivityFeed.tsx +++ b/dashboard/src/main/home/app-dashboard/app-view/tabs/activity-feed/ActivityFeed.tsx @@ -1,7 +1,6 @@ import React, { useContext, useEffect, useState } from "react"; import { useQuery } from "@tanstack/react-query"; import axios from "axios"; -import _ from "lodash"; import styled from "styled-components"; import { z } from "zod"; diff --git a/dashboard/src/main/home/app-dashboard/app-view/tabs/activity-feed/events/focus-views/EventFocusView.tsx b/dashboard/src/main/home/app-dashboard/app-view/tabs/activity-feed/events/focus-views/EventFocusView.tsx index 038174cefb..3e59e8e619 100644 --- a/dashboard/src/main/home/app-dashboard/app-view/tabs/activity-feed/events/focus-views/EventFocusView.tsx +++ b/dashboard/src/main/home/app-dashboard/app-view/tabs/activity-feed/events/focus-views/EventFocusView.tsx @@ -1,6 +1,5 @@ import React, { useEffect, useState } from "react"; import { useQuery } from "@tanstack/react-query"; -import _ from "lodash"; import { useLocation } from "react-router"; import styled from "styled-components"; import { match } from "ts-pattern"; diff --git a/dashboard/src/main/home/app-dashboard/expanded-app/GHABanner.tsx b/dashboard/src/main/home/app-dashboard/expanded-app/GHABanner.tsx index 65d6f6b0fa..b0259b5475 100644 --- a/dashboard/src/main/home/app-dashboard/expanded-app/GHABanner.tsx +++ b/dashboard/src/main/home/app-dashboard/expanded-app/GHABanner.tsx @@ -1,8 +1,7 @@ -import React, { useContext, useEffect, useState } from "react"; +import React, { useContext, useState } from "react"; import styled from "styled-components"; import Banner from "components/porter/Banner"; -import Container from "components/porter/Container"; import Link from "components/porter/Link"; import Spacer from "components/porter/Spacer"; diff --git a/dashboard/src/main/home/app-dashboard/expanded-app/metrics/AreaChart.tsx b/dashboard/src/main/home/app-dashboard/expanded-app/metrics/AreaChart.tsx index 7d91155fb2..a87544960f 100644 --- a/dashboard/src/main/home/app-dashboard/expanded-app/metrics/AreaChart.tsx +++ b/dashboard/src/main/home/app-dashboard/expanded-app/metrics/AreaChart.tsx @@ -9,7 +9,6 @@ import { AreaClosed, Bar, Line, LinePath } from "@visx/shape"; import { defaultStyles, TooltipWithBounds, useTooltip } from "@visx/tooltip"; import { bisector, extent, max } from "d3-array"; import { timeFormat } from "d3-time-format"; -import _ from "lodash"; import styled from "styled-components"; import { type NormalizedMetricsData } from "../../../cluster-dashboard/expanded-chart/metrics/types"; diff --git a/dashboard/src/main/home/app-dashboard/expanded-app/metrics/MetricsChart.tsx b/dashboard/src/main/home/app-dashboard/expanded-app/metrics/MetricsChart.tsx index 7a4c6d2c40..905a550cc6 100644 --- a/dashboard/src/main/home/app-dashboard/expanded-app/metrics/MetricsChart.tsx +++ b/dashboard/src/main/home/app-dashboard/expanded-app/metrics/MetricsChart.tsx @@ -1,4 +1,4 @@ -import React, { useState } from "react"; +import React from "react"; import ParentSize from "@visx/responsive/lib/components/ParentSize"; import styled from "styled-components"; diff --git a/dashboard/src/main/home/app-dashboard/expanded-app/metrics/StackedAreaChart.tsx b/dashboard/src/main/home/app-dashboard/expanded-app/metrics/StackedAreaChart.tsx index a7323675e3..4d2a84f2fc 100644 --- a/dashboard/src/main/home/app-dashboard/expanded-app/metrics/StackedAreaChart.tsx +++ b/dashboard/src/main/home/app-dashboard/expanded-app/metrics/StackedAreaChart.tsx @@ -6,7 +6,6 @@ import { scaleLinear, scaleTime } from "@visx/scale"; import { AreaSeries, AreaStack, Tooltip, XYChart } from "@visx/xychart"; import { bisector, extent, max } from "d3-array"; import { timeFormat } from "d3-time-format"; -import _ from "lodash"; import styled from "styled-components"; import { type NormalizedNginxStatusMetricsData } from "../../../cluster-dashboard/expanded-chart/metrics/types"; diff --git a/dashboard/src/main/home/app-dashboard/validate-apply/app-settings/EnvGroups.tsx b/dashboard/src/main/home/app-dashboard/validate-apply/app-settings/EnvGroups.tsx index f6996772dc..0d77d9c141 100644 --- a/dashboard/src/main/home/app-dashboard/validate-apply/app-settings/EnvGroups.tsx +++ b/dashboard/src/main/home/app-dashboard/validate-apply/app-settings/EnvGroups.tsx @@ -5,7 +5,6 @@ import styled from "styled-components"; import { type IterableElement } from "type-fest"; import Button from "components/porter/Button"; -import Icon from "components/porter/Icon"; import Spacer from "components/porter/Spacer"; import Text from "components/porter/Text"; import { type PorterAppFormData } from "lib/porter-apps"; diff --git a/dashboard/src/main/home/app-dashboard/validate-apply/jobs/utils.ts b/dashboard/src/main/home/app-dashboard/validate-apply/jobs/utils.ts index 25b4ad5b44..03c73425ec 100644 --- a/dashboard/src/main/home/app-dashboard/validate-apply/jobs/utils.ts +++ b/dashboard/src/main/home/app-dashboard/validate-apply/jobs/utils.ts @@ -1,9 +1,7 @@ import { differenceInSeconds, intervalToDuration } from "date-fns"; -import { z } from "zod"; import { type JobRun } from "lib/hooks/useJobs"; -import api from "shared/api"; import { timeFrom } from "shared/string_utils"; export const ranFor = (start: string, end?: string | number) => { diff --git a/dashboard/src/main/home/app-dashboard/validate-apply/logs/Logs.tsx b/dashboard/src/main/home/app-dashboard/validate-apply/logs/Logs.tsx index 77b9ad4c7e..2877e24cb7 100644 --- a/dashboard/src/main/home/app-dashboard/validate-apply/logs/Logs.tsx +++ b/dashboard/src/main/home/app-dashboard/validate-apply/logs/Logs.tsx @@ -1,7 +1,6 @@ import React, { useCallback, useEffect, useRef, useState } from "react"; import axios from "axios"; import dayjs, { type Dayjs } from "dayjs"; -import _ from "lodash"; import { useLocation } from "react-router"; import { useTimer } from "react-timer-hook"; import styled from "styled-components"; diff --git a/dashboard/src/main/home/app-dashboard/validate-apply/services-settings/ServiceContainer.tsx b/dashboard/src/main/home/app-dashboard/validate-apply/services-settings/ServiceContainer.tsx index 4ed6afcfc4..6ec948a7da 100644 --- a/dashboard/src/main/home/app-dashboard/validate-apply/services-settings/ServiceContainer.tsx +++ b/dashboard/src/main/home/app-dashboard/validate-apply/services-settings/ServiceContainer.tsx @@ -1,6 +1,5 @@ import React from "react"; import { AnimatePresence, motion } from "framer-motion"; -import _ from "lodash"; import { type UseFieldArrayUpdate } from "react-hook-form"; import styled, { keyframes } from "styled-components"; import { match } from "ts-pattern"; diff --git a/dashboard/src/main/home/app-dashboard/validate-apply/services-settings/footers/JobFooter.tsx b/dashboard/src/main/home/app-dashboard/validate-apply/services-settings/footers/JobFooter.tsx index 39b90a951e..c263693126 100644 --- a/dashboard/src/main/home/app-dashboard/validate-apply/services-settings/footers/JobFooter.tsx +++ b/dashboard/src/main/home/app-dashboard/validate-apply/services-settings/footers/JobFooter.tsx @@ -1,5 +1,4 @@ import React from "react"; -import _ from "lodash"; import styled from "styled-components"; import Button from "components/porter/Button"; diff --git a/dashboard/src/main/home/app-dashboard/validate-apply/services-settings/footers/ServiceStatusFooter.tsx b/dashboard/src/main/home/app-dashboard/validate-apply/services-settings/footers/ServiceStatusFooter.tsx index 57550a0314..1b77de7a2b 100644 --- a/dashboard/src/main/home/app-dashboard/validate-apply/services-settings/footers/ServiceStatusFooter.tsx +++ b/dashboard/src/main/home/app-dashboard/validate-apply/services-settings/footers/ServiceStatusFooter.tsx @@ -1,5 +1,4 @@ import React, { useState } from "react"; -import _ from "lodash"; import AnimateHeight, { type Height } from "react-animate-height"; import styled from "styled-components"; import { match } from "ts-pattern"; diff --git a/dashboard/src/main/home/cluster-dashboard/NamespaceSelector.tsx b/dashboard/src/main/home/cluster-dashboard/NamespaceSelector.tsx index 4c46fde807..21d51b8c32 100644 --- a/dashboard/src/main/home/cluster-dashboard/NamespaceSelector.tsx +++ b/dashboard/src/main/home/cluster-dashboard/NamespaceSelector.tsx @@ -1,4 +1,4 @@ -import React, { useContext, useEffect, useMemo, useState } from "react"; +import React, { useContext, useEffect, useState } from "react"; import styled from "styled-components"; import RadioFilter from "components/RadioFilter"; diff --git a/dashboard/src/main/home/cluster-dashboard/apps/AppDashboard.tsx b/dashboard/src/main/home/cluster-dashboard/apps/AppDashboard.tsx index a64e0e9001..d1a18ba41f 100644 --- a/dashboard/src/main/home/cluster-dashboard/apps/AppDashboard.tsx +++ b/dashboard/src/main/home/cluster-dashboard/apps/AppDashboard.tsx @@ -8,7 +8,6 @@ import Spacer from "components/porter/Spacer"; import { withAuth, type WithAuthProps } from "shared/auth/AuthorizationHoc"; import { Context } from "shared/Context"; import { pushFiltered, pushQueryParams, type PorterUrl } from "shared/routing"; -import { JobStatusType } from "shared/types"; import web from "assets/web.png"; import ChartList from "../chart/ChartList"; diff --git a/dashboard/src/main/home/cluster-dashboard/chart/Chart.tsx b/dashboard/src/main/home/cluster-dashboard/chart/Chart.tsx index 6df719fa34..9fa95d61e7 100644 --- a/dashboard/src/main/home/cluster-dashboard/chart/Chart.tsx +++ b/dashboard/src/main/home/cluster-dashboard/chart/Chart.tsx @@ -9,7 +9,6 @@ import { Tooltip, Zoom } from "@material-ui/core"; import { createTheme, MuiThemeProvider, - withStyles, } from "@material-ui/core/styles"; import CronParser from "cron-parser"; import _ from "lodash"; @@ -21,11 +20,9 @@ import StatusIndicator from "components/StatusIndicator"; import api from "shared/api"; import { Context } from "shared/Context"; -import { pushFiltered } from "shared/routing"; import { readableDate } from "shared/string_utils"; import { JobStatusType, - StorageType, type ChartType, type JobStatusWithTimeType, } from "shared/types"; diff --git a/dashboard/src/main/home/cluster-dashboard/chart/ChartList.tsx b/dashboard/src/main/home/cluster-dashboard/chart/ChartList.tsx index 3993149349..8b1b578e61 100644 --- a/dashboard/src/main/home/cluster-dashboard/chart/ChartList.tsx +++ b/dashboard/src/main/home/cluster-dashboard/chart/ChartList.tsx @@ -12,7 +12,6 @@ import { useWebsockets } from "shared/hooks/useWebsockets"; import { type PorterUrl } from "shared/routing"; import { JobStatusType, - StorageType, type ChartType, type ClusterType, type JobStatusWithTimeType, diff --git a/dashboard/src/main/home/cluster-dashboard/chart/JobRunTable.tsx b/dashboard/src/main/home/cluster-dashboard/chart/JobRunTable.tsx index eb58f2ed86..05d1b07737 100644 --- a/dashboard/src/main/home/cluster-dashboard/chart/JobRunTable.tsx +++ b/dashboard/src/main/home/cluster-dashboard/chart/JobRunTable.tsx @@ -1,18 +1,16 @@ import React, { useContext, useEffect, useMemo, useRef, useState } from "react"; -import { Row, type CellProps, type Column } from "react-table"; +import { type CellProps, type Column } from "react-table"; import styled from "styled-components"; import DynamicLink from "components/DynamicLink"; import Loading from "components/Loading"; import Table from "components/OldTable"; -import api from "shared/api"; import { Context } from "shared/Context"; import { useWebsockets, type NewWebsocketOptions, } from "shared/hooks/useWebsockets"; -import { useRouting } from "shared/routing"; import { relativeDate, timeFrom } from "shared/string_utils"; type Props = { diff --git a/dashboard/src/main/home/cluster-dashboard/dashboard/ClusterSettings.tsx b/dashboard/src/main/home/cluster-dashboard/dashboard/ClusterSettings.tsx index f5dd68de29..a015c3845e 100644 --- a/dashboard/src/main/home/cluster-dashboard/dashboard/ClusterSettings.tsx +++ b/dashboard/src/main/home/cluster-dashboard/dashboard/ClusterSettings.tsx @@ -1,4 +1,4 @@ -import React, { useContext, useEffect, useState } from "react"; +import React, { useContext, useState } from "react"; import { type RouteComponentProps } from "react-router"; import styled from "styled-components"; diff --git a/dashboard/src/main/home/cluster-dashboard/dashboard/Routes.tsx b/dashboard/src/main/home/cluster-dashboard/dashboard/Routes.tsx index 447580dd91..3ed4daf97b 100644 --- a/dashboard/src/main/home/cluster-dashboard/dashboard/Routes.tsx +++ b/dashboard/src/main/home/cluster-dashboard/dashboard/Routes.tsx @@ -1,5 +1,5 @@ import React, { useContext } from "react"; -import { Redirect, Route, Switch, useRouteMatch } from "react-router"; +import { Route, Switch, useRouteMatch } from "react-router"; import { Context } from "shared/Context"; diff --git a/dashboard/src/main/home/cluster-dashboard/env-groups/EnvGroup.tsx b/dashboard/src/main/home/cluster-dashboard/env-groups/EnvGroup.tsx index e5af022cc1..c30d3e30b3 100644 --- a/dashboard/src/main/home/cluster-dashboard/env-groups/EnvGroup.tsx +++ b/dashboard/src/main/home/cluster-dashboard/env-groups/EnvGroup.tsx @@ -1,5 +1,4 @@ import React, { Component } from "react"; -import _ from "lodash"; import { Link } from "react-router-dom"; import styled from "styled-components"; diff --git a/dashboard/src/main/home/cluster-dashboard/env-groups/EnvGroupDashboard.tsx b/dashboard/src/main/home/cluster-dashboard/env-groups/EnvGroupDashboard.tsx index e4c4a7b3b3..ffcf6962d4 100644 --- a/dashboard/src/main/home/cluster-dashboard/env-groups/EnvGroupDashboard.tsx +++ b/dashboard/src/main/home/cluster-dashboard/env-groups/EnvGroupDashboard.tsx @@ -1,4 +1,4 @@ -import React, { Component, useContext, useEffect, useState } from "react"; +import React, { useContext, useState } from "react"; import { withRouter, type RouteComponentProps } from "react-router"; import styled from "styled-components"; @@ -11,7 +11,7 @@ import Text from "components/porter/Text"; import { withAuth, type WithAuthProps } from "shared/auth/AuthorizationHoc"; import { Context } from "shared/Context"; -import { getQueryParam, pushFiltered, pushQueryParams } from "shared/routing"; +import { getQueryParam, pushQueryParams } from "shared/routing"; import { type ClusterType } from "shared/types"; import sliders from "assets/env-groups.svg"; diff --git a/dashboard/src/main/home/cluster-dashboard/env-groups/EnvGroupList.tsx b/dashboard/src/main/home/cluster-dashboard/env-groups/EnvGroupList.tsx index 7f5508a96d..ef7d9073f0 100644 --- a/dashboard/src/main/home/cluster-dashboard/env-groups/EnvGroupList.tsx +++ b/dashboard/src/main/home/cluster-dashboard/env-groups/EnvGroupList.tsx @@ -1,4 +1,4 @@ -import React, { useContext, useEffect, useMemo, useState } from "react"; +import React, { useContext, useEffect, useState } from "react"; import { withRouter, type RouteComponentProps } from "react-router"; import styled from "styled-components"; diff --git a/dashboard/src/main/home/cluster-dashboard/env-groups/ExpandedEnvGroup.tsx b/dashboard/src/main/home/cluster-dashboard/env-groups/ExpandedEnvGroup.tsx index 9bbb8bcd8c..b3db320e09 100644 --- a/dashboard/src/main/home/cluster-dashboard/env-groups/ExpandedEnvGroup.tsx +++ b/dashboard/src/main/home/cluster-dashboard/env-groups/ExpandedEnvGroup.tsx @@ -1,6 +1,5 @@ import React, { useContext, useEffect, useMemo, useState } from "react"; -import yaml from "js-yaml"; -import _, { remove } from "lodash"; +import { remove } from "lodash"; import styled, { keyframes } from "styled-components"; import DocsHelper from "components/DocsHelper"; diff --git a/dashboard/src/main/home/cluster-dashboard/env-groups/ExpandedEnvGroupDashboard.tsx b/dashboard/src/main/home/cluster-dashboard/env-groups/ExpandedEnvGroupDashboard.tsx index 8d2433cd7c..dede423125 100644 --- a/dashboard/src/main/home/cluster-dashboard/env-groups/ExpandedEnvGroupDashboard.tsx +++ b/dashboard/src/main/home/cluster-dashboard/env-groups/ExpandedEnvGroupDashboard.tsx @@ -1,4 +1,4 @@ -import React, { Component, useContext, useEffect, useState } from "react"; +import React, { useContext, useEffect, useState } from "react"; import { useQuery } from "@tanstack/react-query"; import { useParams, withRouter, type RouteComponentProps } from "react-router"; import styled from "styled-components"; @@ -9,9 +9,8 @@ import Placeholder from "components/Placeholder"; import api from "shared/api"; import { withAuth, type WithAuthProps } from "shared/auth/AuthorizationHoc"; import { Context } from "shared/Context"; -import { getQueryParam, pushQueryParams } from "shared/routing"; +import { getQueryParam } from "shared/routing"; import { type ClusterType } from "shared/types"; -import sliders from "assets/sliders.svg"; import ExpandedEnvGroup from "./ExpandedEnvGroup"; diff --git a/dashboard/src/main/home/cluster-dashboard/expanded-chart/ExpandedChart.tsx b/dashboard/src/main/home/cluster-dashboard/expanded-chart/ExpandedChart.tsx index ec631d1333..eccfbaea8c 100644 --- a/dashboard/src/main/home/cluster-dashboard/expanded-chart/ExpandedChart.tsx +++ b/dashboard/src/main/home/cluster-dashboard/expanded-chart/ExpandedChart.tsx @@ -7,7 +7,6 @@ import Loading from "components/Loading"; import PorterFormWrapper from "components/porter-form/PorterFormWrapper"; import Banner from "components/porter/Banner"; import Spacer from "components/porter/Spacer"; -import StatusIndicator from "components/StatusIndicator"; import TitleSection from "components/TitleSection"; import api from "shared/api"; diff --git a/dashboard/src/main/home/cluster-dashboard/expanded-chart/ExpandedChartWrapper.tsx b/dashboard/src/main/home/cluster-dashboard/expanded-chart/ExpandedChartWrapper.tsx index 67b11ef80f..5e73ce329f 100644 --- a/dashboard/src/main/home/cluster-dashboard/expanded-chart/ExpandedChartWrapper.tsx +++ b/dashboard/src/main/home/cluster-dashboard/expanded-chart/ExpandedChartWrapper.tsx @@ -9,7 +9,6 @@ import api from "shared/api"; import { Context } from "shared/Context"; import { pushFiltered } from "shared/routing"; import { - StorageType, type ChartType, type ChartTypeWithExtendedConfig, } from "shared/types"; diff --git a/dashboard/src/main/home/cluster-dashboard/preview-environments/v2/setup-app/Addons.tsx b/dashboard/src/main/home/cluster-dashboard/preview-environments/v2/setup-app/Addons.tsx index e35bc4ebca..f3f8ce0a13 100644 --- a/dashboard/src/main/home/cluster-dashboard/preview-environments/v2/setup-app/Addons.tsx +++ b/dashboard/src/main/home/cluster-dashboard/preview-environments/v2/setup-app/Addons.tsx @@ -1,5 +1,4 @@ import React from "react"; -import _ from "lodash"; import { useFormContext } from "react-hook-form"; import Spacer from "components/porter/Spacer"; diff --git a/dashboard/src/main/home/cluster-dashboard/preview-environments/v2/setup-app/CreateTemplate.tsx b/dashboard/src/main/home/cluster-dashboard/preview-environments/v2/setup-app/CreateTemplate.tsx index 447b12cbfa..a4da8b5bfb 100644 --- a/dashboard/src/main/home/cluster-dashboard/preview-environments/v2/setup-app/CreateTemplate.tsx +++ b/dashboard/src/main/home/cluster-dashboard/preview-environments/v2/setup-app/CreateTemplate.tsx @@ -1,5 +1,4 @@ import React, { useEffect, useState } from "react"; -import _ from "lodash"; import { useFormContext } from "react-hook-form"; import { useHistory } from "react-router"; import styled from "styled-components"; diff --git a/dashboard/src/main/home/cluster-dashboard/preview-environments/v2/setup-app/PreviewAppDataContainer.tsx b/dashboard/src/main/home/cluster-dashboard/preview-environments/v2/setup-app/PreviewAppDataContainer.tsx index 1809112335..8b4459084f 100644 --- a/dashboard/src/main/home/cluster-dashboard/preview-environments/v2/setup-app/PreviewAppDataContainer.tsx +++ b/dashboard/src/main/home/cluster-dashboard/preview-environments/v2/setup-app/PreviewAppDataContainer.tsx @@ -1,5 +1,4 @@ import React, { useEffect, useMemo, useState } from "react"; -import _ from "lodash"; import { useFormContext } from "react-hook-form"; import { match } from "ts-pattern"; diff --git a/dashboard/src/main/home/cluster-dashboard/preview-environments/v2/setup-app/ServiceSettings.tsx b/dashboard/src/main/home/cluster-dashboard/preview-environments/v2/setup-app/ServiceSettings.tsx index 09749c655b..e468409e22 100644 --- a/dashboard/src/main/home/cluster-dashboard/preview-environments/v2/setup-app/ServiceSettings.tsx +++ b/dashboard/src/main/home/cluster-dashboard/preview-environments/v2/setup-app/ServiceSettings.tsx @@ -1,5 +1,4 @@ import React from "react"; -import _ from "lodash"; import { useFormContext } from "react-hook-form"; import Spacer from "components/porter/Spacer"; diff --git a/dashboard/src/main/home/dashboard/OldClusterList.tsx b/dashboard/src/main/home/dashboard/OldClusterList.tsx index 10ac1f23d5..83a8540433 100644 --- a/dashboard/src/main/home/dashboard/OldClusterList.tsx +++ b/dashboard/src/main/home/dashboard/OldClusterList.tsx @@ -2,8 +2,6 @@ import React, { Component } from "react"; import { withRouter, type RouteComponentProps } from "react-router"; import styled from "styled-components"; -import Heading from "components/form-components/Heading"; -import Helper from "components/form-components/Helper"; import api from "shared/api"; import { Context } from "shared/Context"; diff --git a/dashboard/src/main/home/env-dashboard/EnvGroup.tsx b/dashboard/src/main/home/env-dashboard/EnvGroup.tsx index e5af022cc1..c30d3e30b3 100644 --- a/dashboard/src/main/home/env-dashboard/EnvGroup.tsx +++ b/dashboard/src/main/home/env-dashboard/EnvGroup.tsx @@ -1,5 +1,4 @@ import React, { Component } from "react"; -import _ from "lodash"; import { Link } from "react-router-dom"; import styled from "styled-components"; diff --git a/dashboard/src/main/home/env-dashboard/tabs/SyncedAppsTab.tsx b/dashboard/src/main/home/env-dashboard/tabs/SyncedAppsTab.tsx index 9925839890..d30d78a676 100644 --- a/dashboard/src/main/home/env-dashboard/tabs/SyncedAppsTab.tsx +++ b/dashboard/src/main/home/env-dashboard/tabs/SyncedAppsTab.tsx @@ -3,17 +3,13 @@ import _ from "lodash"; import { useHistory } from "react-router"; import styled from "styled-components"; -import Clickable from "components/porter/Clickable"; -import Container from "components/porter/Container"; import Fieldset from "components/porter/Fieldset"; -import Image from "components/porter/Image"; import Spacer from "components/porter/Spacer"; import Text from "components/porter/Text"; import SelectableAppList from "main/home/app-dashboard/apps/SelectableAppList"; import { useLatestAppRevisions } from "lib/hooks/useLatestAppRevisions"; import { Context } from "shared/Context"; -import box from "assets/box.png"; type Props = { envGroup: { diff --git a/dashboard/src/main/home/infrastructure-dashboard/ClusterStatus.tsx b/dashboard/src/main/home/infrastructure-dashboard/ClusterStatus.tsx index 7efaec783b..dda34ee065 100644 --- a/dashboard/src/main/home/infrastructure-dashboard/ClusterStatus.tsx +++ b/dashboard/src/main/home/infrastructure-dashboard/ClusterStatus.tsx @@ -1,5 +1,4 @@ import React, { useMemo } from "react"; -import _ from "lodash"; import pluralize from "pluralize"; import styled from "styled-components"; diff --git a/dashboard/src/main/home/integrations/GitlabIntegrationList.tsx b/dashboard/src/main/home/integrations/GitlabIntegrationList.tsx index cfbd065553..5fe7564a0c 100644 --- a/dashboard/src/main/home/integrations/GitlabIntegrationList.tsx +++ b/dashboard/src/main/home/integrations/GitlabIntegrationList.tsx @@ -1,7 +1,6 @@ -import React, { useContext, useRef, useState } from "react"; +import React, { useContext, useState } from "react"; import styled from "styled-components"; -import DynamicLink from "components/DynamicLink"; import { integrationList } from "shared/common"; diff --git a/dashboard/src/main/home/integrations/create-integration/CreateIntegrationForm.tsx b/dashboard/src/main/home/integrations/create-integration/CreateIntegrationForm.tsx index eed3754c8d..f01cc9d0ee 100644 --- a/dashboard/src/main/home/integrations/create-integration/CreateIntegrationForm.tsx +++ b/dashboard/src/main/home/integrations/create-integration/CreateIntegrationForm.tsx @@ -1,5 +1,4 @@ import React, { Component } from "react"; -import styled from "styled-components"; import DockerHubForm from "./DockerHubForm"; import ECRForm from "./ECRForm"; diff --git a/dashboard/src/main/home/launch/Launch.tsx b/dashboard/src/main/home/launch/Launch.tsx index 629b196e8a..e322de1d0e 100644 --- a/dashboard/src/main/home/launch/Launch.tsx +++ b/dashboard/src/main/home/launch/Launch.tsx @@ -11,7 +11,6 @@ import Fieldset from "components/porter/Fieldset"; import Spacer from "components/porter/Spacer"; import Text from "components/porter/Text"; import TabSelector from "components/TabSelector"; -import TitleSection from "components/TitleSection"; import api from "shared/api"; import { Context } from "shared/Context"; @@ -23,7 +22,6 @@ import { } from "shared/types"; import DashboardHeader from "../cluster-dashboard/DashboardHeader"; -import NoClusterPlaceholder from "../NoClusterPlaceholder"; import ExpandedTemplate from "./expanded-template/ExpandedTemplate"; import LaunchFlow from "./launch-flow/LaunchFlow"; import TemplateList from "./TemplateList"; diff --git a/dashboard/src/main/home/launch/LaunchWrapper.tsx b/dashboard/src/main/home/launch/LaunchWrapper.tsx index f7de63de90..5d0c1d95b6 100644 --- a/dashboard/src/main/home/launch/LaunchWrapper.tsx +++ b/dashboard/src/main/home/launch/LaunchWrapper.tsx @@ -1,4 +1,4 @@ -import React, { useContext, useState } from "react"; +import React, { useContext } from "react"; import styled from "styled-components"; import { Context } from "shared/Context"; diff --git a/dashboard/src/main/home/launch/TemplateList.tsx b/dashboard/src/main/home/launch/TemplateList.tsx index 3331e0d38a..9d3cdcee75 100644 --- a/dashboard/src/main/home/launch/TemplateList.tsx +++ b/dashboard/src/main/home/launch/TemplateList.tsx @@ -1,4 +1,4 @@ -import React, { useContext, useEffect, useMemo, useState } from "react"; +import React, { useContext, useEffect, useState } from "react"; import semver from "semver"; import styled from "styled-components"; @@ -13,7 +13,6 @@ import { hardcodedNames, } from "shared/hardcodedNameDict"; import { type PorterTemplate } from "shared/types"; -import fire from "assets/fire.svg"; import job from "assets/job.png"; import web from "assets/web.png"; import worker from "assets/worker.png"; diff --git a/dashboard/src/main/home/launch/launch-flow/SourcePage.tsx b/dashboard/src/main/home/launch/launch-flow/SourcePage.tsx index 08eb841f82..ce6f7e1a22 100644 --- a/dashboard/src/main/home/launch/launch-flow/SourcePage.tsx +++ b/dashboard/src/main/home/launch/launch-flow/SourcePage.tsx @@ -12,7 +12,6 @@ import { isAlphanumeric } from "shared/common"; import { Context } from "shared/Context"; import { pushFiltered } from "shared/routing"; import { type ActionConfigType } from "shared/types"; -import close from "assets/close.png"; type PropsType = RouteComponentProps & { templateName: string; diff --git a/dashboard/src/main/home/modals/ClusterInstructionsModal.tsx b/dashboard/src/main/home/modals/ClusterInstructionsModal.tsx index c386ef7dd7..0f3f94709d 100644 --- a/dashboard/src/main/home/modals/ClusterInstructionsModal.tsx +++ b/dashboard/src/main/home/modals/ClusterInstructionsModal.tsx @@ -4,7 +4,6 @@ import styled from "styled-components"; import TabSelector from "components/TabSelector"; import { Context } from "shared/Context"; -import close from "assets/close.png"; type PropsType = {}; diff --git a/dashboard/src/main/home/modals/EditInviteOrCollaboratorModal.tsx b/dashboard/src/main/home/modals/EditInviteOrCollaboratorModal.tsx index 3fe989bce4..082716e516 100644 --- a/dashboard/src/main/home/modals/EditInviteOrCollaboratorModal.tsx +++ b/dashboard/src/main/home/modals/EditInviteOrCollaboratorModal.tsx @@ -7,7 +7,6 @@ import SaveButton from "components/SaveButton"; import api from "shared/api"; import { Context } from "shared/Context"; -import close from "assets/close.png"; const EditCollaboratorModal = () => { const { diff --git a/dashboard/src/main/home/modals/EnvEditorModal.tsx b/dashboard/src/main/home/modals/EnvEditorModal.tsx index 77df21127d..e729211c95 100644 --- a/dashboard/src/main/home/modals/EnvEditorModal.tsx +++ b/dashboard/src/main/home/modals/EnvEditorModal.tsx @@ -2,7 +2,6 @@ import React, { Component } from "react"; import AceEditor from "react-ace"; import styled from "styled-components"; -import close from "assets/close.png"; import "shared/ace-porter-theme"; import "ace-builds/src-noconflict/mode-text"; @@ -10,7 +9,6 @@ import "ace-builds/src-noconflict/mode-text"; import Button from "components/porter/Button"; import Spacer from "components/porter/Spacer"; import Text from "components/porter/Text"; -import SaveButton from "components/SaveButton"; import { Context } from "shared/Context"; diff --git a/dashboard/src/main/home/modals/IntegrationsInstructionsModal.tsx b/dashboard/src/main/home/modals/IntegrationsInstructionsModal.tsx index 8bd4afcadf..555120bfe0 100644 --- a/dashboard/src/main/home/modals/IntegrationsInstructionsModal.tsx +++ b/dashboard/src/main/home/modals/IntegrationsInstructionsModal.tsx @@ -4,7 +4,6 @@ import styled from "styled-components"; import TabSelector from "components/TabSelector"; import { Context } from "shared/Context"; -import close from "assets/close.png"; type PropsType = {}; diff --git a/dashboard/src/main/home/modals/IntegrationsModal.tsx b/dashboard/src/main/home/modals/IntegrationsModal.tsx index 43137f1319..ab8cbf5fea 100644 --- a/dashboard/src/main/home/modals/IntegrationsModal.tsx +++ b/dashboard/src/main/home/modals/IntegrationsModal.tsx @@ -6,7 +6,6 @@ import Tooltip from "components/porter/Tooltip"; import api from "shared/api"; import { integrationList } from "shared/common"; import { Context } from "shared/Context"; -import close from "assets/close.png"; type PropsType = {}; diff --git a/dashboard/src/main/home/modals/NamespaceModal.tsx b/dashboard/src/main/home/modals/NamespaceModal.tsx index b982573806..0c4faad4a3 100644 --- a/dashboard/src/main/home/modals/NamespaceModal.tsx +++ b/dashboard/src/main/home/modals/NamespaceModal.tsx @@ -6,7 +6,6 @@ import SaveButton from "components/SaveButton"; import api from "shared/api"; import { Context } from "shared/Context"; -import close from "assets/close.png"; type PropsType = {}; diff --git a/dashboard/src/main/home/modals/RedirectToOnboardingModal.tsx b/dashboard/src/main/home/modals/RedirectToOnboardingModal.tsx index cd0f8b27f4..98fb71c18f 100644 --- a/dashboard/src/main/home/modals/RedirectToOnboardingModal.tsx +++ b/dashboard/src/main/home/modals/RedirectToOnboardingModal.tsx @@ -1,14 +1,11 @@ -import React, { useContext, useEffect, useState } from "react"; +import React, { useContext } from "react"; import { Link } from "react-router-dom"; import styled from "styled-components"; -import Heading from "components/form-components/Heading"; import Helper from "components/form-components/Helper"; import { Context } from "shared/Context"; -import Loading from "../../../components/Loading"; -import api from "../../../shared/api"; const RedirectToOnboardingModal = () => { const { setCurrentModal } = useContext(Context); diff --git a/dashboard/src/main/home/modals/SkipProvisioningModal.tsx b/dashboard/src/main/home/modals/SkipProvisioningModal.tsx index da8b5bd906..29bf5b2c99 100644 --- a/dashboard/src/main/home/modals/SkipProvisioningModal.tsx +++ b/dashboard/src/main/home/modals/SkipProvisioningModal.tsx @@ -1,7 +1,6 @@ import React, { useContext } from "react"; import styled from "styled-components"; -import InputRow from "components/form-components/InputRow"; import SaveButton from "components/SaveButton"; import { Context } from "shared/Context"; diff --git a/dashboard/src/main/home/modals/UpdateClusterModal.tsx b/dashboard/src/main/home/modals/UpdateClusterModal.tsx index 401651571d..105acfdb0b 100644 --- a/dashboard/src/main/home/modals/UpdateClusterModal.tsx +++ b/dashboard/src/main/home/modals/UpdateClusterModal.tsx @@ -5,15 +5,12 @@ import styled from "styled-components"; import ConfirmOverlay from "components/ConfirmOverlay"; import InputRow from "components/form-components/InputRow"; import SaveButton from "components/SaveButton"; -import { OFState } from "main/home/onboarding/state"; import api from "shared/api"; import { Context } from "shared/Context"; import { pushFiltered } from "shared/routing"; import { NilCluster } from "shared/types"; -import close from "assets/close.png"; -import { Onboarding as OnboardingSaveType } from "../onboarding/types"; type PropsType = RouteComponentProps & { setRefreshClusters: (x: boolean) => void; diff --git a/dashboard/src/main/home/modals/UpgradeChartModal.tsx b/dashboard/src/main/home/modals/UpgradeChartModal.tsx index b7211d7e15..95579b3813 100644 --- a/dashboard/src/main/home/modals/UpgradeChartModal.tsx +++ b/dashboard/src/main/home/modals/UpgradeChartModal.tsx @@ -1,5 +1,4 @@ import React, { Component } from "react"; -import Markdown from "markdown-to-jsx"; import styled from "styled-components"; import Loading from "components/Loading"; @@ -8,7 +7,6 @@ import SaveButton from "components/SaveButton"; import api from "shared/api"; import { Context } from "shared/Context"; import { type ChartType } from "shared/types"; -import close from "assets/close.png"; type PropsType = { currentChart: ChartType; diff --git a/dashboard/src/main/home/new-project/NewProject.tsx b/dashboard/src/main/home/new-project/NewProject.tsx index f0178785f0..2393f9e201 100644 --- a/dashboard/src/main/home/new-project/NewProject.tsx +++ b/dashboard/src/main/home/new-project/NewProject.tsx @@ -16,7 +16,6 @@ import { type ProjectListType } from "shared/types"; import backArrow from "assets/back_arrow.png"; import gradient from "assets/gradient.png"; -import WelcomeForm from "./WelcomeForm"; type ValidationError = { hasError: boolean; diff --git a/dashboard/src/main/home/onboarding/Onboarding.tsx b/dashboard/src/main/home/onboarding/Onboarding.tsx index 5dcc065f10..049ddb4525 100644 --- a/dashboard/src/main/home/onboarding/Onboarding.tsx +++ b/dashboard/src/main/home/onboarding/Onboarding.tsx @@ -3,12 +3,6 @@ import styled from "styled-components"; import { devtools } from "valtio/utils"; import Loading from "components/Loading"; -import Banner from "components/porter/Banner"; -import Button from "components/porter/Button"; -import DashboardPlaceholder from "components/porter/DashboardPlaceholder"; -import Link from "components/porter/Link"; -import Spacer from "components/porter/Spacer"; -import Text from "components/porter/Text"; import ProvisionerFlow from "components/ProvisionerFlow"; import api from "shared/api"; diff --git a/dashboard/src/main/home/onboarding/components/ProviderSelector.tsx b/dashboard/src/main/home/onboarding/components/ProviderSelector.tsx index 8b6f2a67ec..7e2c61167a 100644 --- a/dashboard/src/main/home/onboarding/components/ProviderSelector.tsx +++ b/dashboard/src/main/home/onboarding/components/ProviderSelector.tsx @@ -1,4 +1,4 @@ -import React, { useMemo, useRef, useState } from "react"; +import React, { useMemo, useState } from "react"; import styled from "styled-components"; import Selector from "components/Selector"; diff --git a/dashboard/src/main/home/onboarding/steps/ConnectRegistry/forms/_AWSRegistryForm.tsx b/dashboard/src/main/home/onboarding/steps/ConnectRegistry/forms/_AWSRegistryForm.tsx index 6b6f587b35..dc8dc561a5 100644 --- a/dashboard/src/main/home/onboarding/steps/ConnectRegistry/forms/_AWSRegistryForm.tsx +++ b/dashboard/src/main/home/onboarding/steps/ConnectRegistry/forms/_AWSRegistryForm.tsx @@ -7,7 +7,6 @@ import InputRow from "components/form-components/InputRow"; import SelectRow from "components/form-components/SelectRow"; import Loading from "components/Loading"; import SaveButton from "components/SaveButton"; -import IntegrationCategories from "main/home/integrations/IntegrationCategories"; import RegistryImageList from "main/home/onboarding/components/RegistryImageList"; import { StateHandler } from "main/home/onboarding/state/StateHandler"; import { type AWSRegistryConfig } from "main/home/onboarding/types"; diff --git a/dashboard/src/main/home/onboarding/steps/ConnectSource.tsx b/dashboard/src/main/home/onboarding/steps/ConnectSource.tsx index dc8aa52643..74568788c7 100644 --- a/dashboard/src/main/home/onboarding/steps/ConnectSource.tsx +++ b/dashboard/src/main/home/onboarding/steps/ConnectSource.tsx @@ -1,5 +1,4 @@ import React, { useEffect, useState } from "react"; -import { Link } from "react-router-dom"; import styled from "styled-components"; import DocsHelper from "components/DocsHelper"; @@ -9,10 +8,8 @@ import TitleSection from "components/TitleSection"; import { connectSourceTracks } from "shared/anayltics"; import api from "shared/api"; -import { useRouting } from "shared/routing"; import github from "assets/github.png"; -import { OFState } from "../state"; type GithubAppAccessData = { username?: string; diff --git a/dashboard/src/main/home/project-settings/APITokensSection.tsx b/dashboard/src/main/home/project-settings/APITokensSection.tsx index ebac395f18..476476fbcd 100644 --- a/dashboard/src/main/home/project-settings/APITokensSection.tsx +++ b/dashboard/src/main/home/project-settings/APITokensSection.tsx @@ -1,4 +1,4 @@ -import React, { useContext, useEffect, useMemo, useState } from "react"; +import React, { useContext, useEffect, useState } from "react"; import styled from "styled-components"; import Heading from "components/form-components/Heading"; diff --git a/dashboard/src/main/home/project-settings/Metadata.tsx b/dashboard/src/main/home/project-settings/Metadata.tsx index 38bab2c00b..4820f8a68a 100644 --- a/dashboard/src/main/home/project-settings/Metadata.tsx +++ b/dashboard/src/main/home/project-settings/Metadata.tsx @@ -2,22 +2,16 @@ import React, { useContext, useEffect, useState } from "react"; import styled from "styled-components"; import CopyToClipboard from "components/CopyToClipboard"; -import Heading from "components/form-components/Heading"; -import Helper from "components/form-components/Helper"; import Icon from "components/porter/Icon"; -import Link from "components/porter/Link"; import Spacer from "components/porter/Spacer"; import Text from "components/porter/Text"; -import TabSelector from "components/TabSelector"; import { type ClusterType } from "shared/types"; import copy from "assets/copy-left.svg"; import gear from "assets/gear.svg"; -import github from "assets/github.png"; import globe from "assets/globe.svg"; import infra from "assets/infra.png"; -import Loading from "../../../components/Loading"; import api from "../../../shared/api"; import { Context } from "../../../shared/Context"; diff --git a/dashboard/src/main/home/project-settings/PermissionGroup.tsx b/dashboard/src/main/home/project-settings/PermissionGroup.tsx index 14da016597..2b8b046048 100644 --- a/dashboard/src/main/home/project-settings/PermissionGroup.tsx +++ b/dashboard/src/main/home/project-settings/PermissionGroup.tsx @@ -1,7 +1,6 @@ import React, { useState } from "react"; import styled from "styled-components"; -import role from "assets/role.svg"; import RoleModal from "./RoleModal"; diff --git a/dashboard/src/main/home/project-settings/ProjectDeleteConsent.tsx b/dashboard/src/main/home/project-settings/ProjectDeleteConsent.tsx index 781238f94d..1522fcd54b 100644 --- a/dashboard/src/main/home/project-settings/ProjectDeleteConsent.tsx +++ b/dashboard/src/main/home/project-settings/ProjectDeleteConsent.tsx @@ -2,15 +2,12 @@ import React, { useContext, useState } from "react"; import styled from "styled-components"; import Button from "components/porter/Button"; -import ExpandableSection from "components/porter/ExpandableSection"; -import Fieldset from "components/porter/Fieldset"; import Input from "components/porter/Input"; import Link from "components/porter/Link"; import Modal from "components/porter/Modal"; import Spacer from "components/porter/Spacer"; import Text from "components/porter/Text"; -import api from "shared/api"; import { Context } from "shared/Context"; type Props = { diff --git a/dashboard/src/main/home/project-settings/ProjectSettings.tsx b/dashboard/src/main/home/project-settings/ProjectSettings.tsx index 3c73f0fc93..702238cc9a 100644 --- a/dashboard/src/main/home/project-settings/ProjectSettings.tsx +++ b/dashboard/src/main/home/project-settings/ProjectSettings.tsx @@ -1,8 +1,7 @@ -import React, { Component, useContext, useEffect, useState } from "react"; +import React, { useContext, useEffect, useState } from "react"; import _ from "lodash"; import { withRouter, - WithRouterProps, type RouteComponentProps, } from "react-router"; import styled from "styled-components"; @@ -12,7 +11,6 @@ import Helper from "components/form-components/Helper"; import Button from "components/porter/Button"; import Error from "components/porter/Error"; import Input from "components/porter/Input"; -import Link from "components/porter/Link"; import Spacer from "components/porter/Spacer"; import TabRegion from "components/TabRegion"; diff --git a/dashboard/src/main/home/project-settings/api-tokens/CreateAPITokenForm.tsx b/dashboard/src/main/home/project-settings/api-tokens/CreateAPITokenForm.tsx index 1b0186f7e5..170b99c8bf 100644 --- a/dashboard/src/main/home/project-settings/api-tokens/CreateAPITokenForm.tsx +++ b/dashboard/src/main/home/project-settings/api-tokens/CreateAPITokenForm.tsx @@ -1,5 +1,4 @@ -import React, { useContext, useEffect, useMemo, useState } from "react"; -import { Column } from "react-table"; +import React, { useContext, useState } from "react"; import styled from "styled-components"; import CopyToClipboard from "components/CopyToClipboard"; @@ -7,15 +6,11 @@ import Heading from "components/form-components/Heading"; import Helper from "components/form-components/Helper"; import InputRow from "components/form-components/InputRow"; import SelectRow from "components/form-components/SelectRow"; -import Loading from "components/Loading"; -import Table from "components/OldTable"; -import RadioSelector from "components/RadioSelector"; import SaveButton from "components/SaveButton"; import api from "shared/api"; import { type PolicyDocType, type Verbs } from "shared/auth/types"; import { Context } from "shared/Context"; -import { InviteType } from "shared/types"; import backArrow from "assets/back_arrow.png"; import { type APIToken } from "../APITokensSection"; diff --git a/dashboard/src/main/home/project-settings/api-tokens/CustomPolicyForm.tsx b/dashboard/src/main/home/project-settings/api-tokens/CustomPolicyForm.tsx index 7662a541ce..48a25ed109 100644 --- a/dashboard/src/main/home/project-settings/api-tokens/CustomPolicyForm.tsx +++ b/dashboard/src/main/home/project-settings/api-tokens/CustomPolicyForm.tsx @@ -1,25 +1,12 @@ -import React, { useContext, useEffect, useMemo, useState } from "react"; -import { Column } from "react-table"; +import React from "react"; import styled from "styled-components"; -import CopyToClipboard from "components/CopyToClipboard"; import CheckboxList from "components/form-components/CheckboxList"; import Heading from "components/form-components/Heading"; import Helper from "components/form-components/Helper"; import InputRow from "components/form-components/InputRow"; -import SelectRow from "components/form-components/SelectRow"; -import Loading from "components/Loading"; -import Table from "components/OldTable"; -import RadioSelector from "components/RadioSelector"; -import SaveButton from "components/SaveButton"; -import api from "shared/api"; -import { PolicyDocType } from "shared/auth/types"; -import { Context } from "shared/Context"; -import { InviteType } from "shared/types"; -import backArrow from "assets/back_arrow.png"; -import { APIToken } from "../APITokensSection"; import { type ScopeOption } from "./CreateAPITokenForm"; type Props = { diff --git a/dashboard/src/main/home/provisioner/AWSFormSection.tsx b/dashboard/src/main/home/provisioner/AWSFormSection.tsx index 8b21ef56d0..c888d57951 100644 --- a/dashboard/src/main/home/provisioner/AWSFormSection.tsx +++ b/dashboard/src/main/home/provisioner/AWSFormSection.tsx @@ -1,4 +1,4 @@ -import React, { Component, useContext, useEffect, useState } from "react"; +import React, { useContext, useEffect, useState } from "react"; import { useHistory, useLocation } from "react-router"; import styled from "styled-components"; diff --git a/dashboard/src/main/home/provisioner/AzureFormSection.tsx b/dashboard/src/main/home/provisioner/AzureFormSection.tsx index 65b04092ba..43e0f56199 100644 --- a/dashboard/src/main/home/provisioner/AzureFormSection.tsx +++ b/dashboard/src/main/home/provisioner/AzureFormSection.tsx @@ -1,15 +1,10 @@ -import React, { Component, useContext, useEffect, useState } from "react"; +import React, { useContext, useEffect, useState } from "react"; import styled from "styled-components"; -import CheckboxList from "components/form-components/CheckboxList"; -import CheckboxRow from "components/form-components/CheckboxRow"; import Heading from "components/form-components/Heading"; -import Helper from "components/form-components/Helper"; import InputRow from "components/form-components/InputRow"; -import SelectRow from "components/form-components/SelectRow"; import SaveButton from "components/SaveButton"; -import api from "shared/api"; import { isAlphanumeric } from "shared/common"; import { Context } from "shared/Context"; import { type InfraType } from "shared/types"; diff --git a/dashboard/src/main/home/provisioner/DOFormSection.tsx b/dashboard/src/main/home/provisioner/DOFormSection.tsx index 41091b2d17..ca3abb2a2c 100644 --- a/dashboard/src/main/home/provisioner/DOFormSection.tsx +++ b/dashboard/src/main/home/provisioner/DOFormSection.tsx @@ -1,4 +1,4 @@ -import React, { Component, useContext, useEffect, useState } from "react"; +import React, { useContext, useEffect, useState } from "react"; import styled from "styled-components"; import CheckboxList from "components/form-components/CheckboxList"; @@ -9,7 +9,6 @@ import InputRow from "components/form-components/InputRow"; import SelectRow from "components/form-components/SelectRow"; import SaveButton from "components/SaveButton"; -import api from "shared/api"; import { isAlphanumeric } from "shared/common"; import { Context } from "shared/Context"; import { type InfraType } from "shared/types"; diff --git a/dashboard/src/main/home/provisioner/ExistingClusterSection.tsx b/dashboard/src/main/home/provisioner/ExistingClusterSection.tsx index 7f8d7a3c20..09ae5f18db 100644 --- a/dashboard/src/main/home/provisioner/ExistingClusterSection.tsx +++ b/dashboard/src/main/home/provisioner/ExistingClusterSection.tsx @@ -4,11 +4,9 @@ import styled from "styled-components"; import SaveButton from "components/SaveButton"; -import api from "shared/api"; import { isAlphanumeric } from "shared/common"; import { Context } from "shared/Context"; import { pushFiltered } from "shared/routing"; -import { ProjectType } from "shared/types"; type PropsType = RouteComponentProps & { projectName: string; diff --git a/dashboard/src/main/home/provisioner/GCPFormSection.tsx b/dashboard/src/main/home/provisioner/GCPFormSection.tsx index 29915f737d..da15420401 100644 --- a/dashboard/src/main/home/provisioner/GCPFormSection.tsx +++ b/dashboard/src/main/home/provisioner/GCPFormSection.tsx @@ -1,4 +1,4 @@ -import React, { Component, useContext, useEffect, useState } from "react"; +import React, { useContext, useEffect, useState } from "react"; import { useHistory, useLocation } from "react-router"; import styled from "styled-components"; diff --git a/dashboard/src/main/home/provisioner/ProvisionerSettings.tsx b/dashboard/src/main/home/provisioner/ProvisionerSettings.tsx index 6fe6531783..6b95129e7e 100644 --- a/dashboard/src/main/home/provisioner/ProvisionerSettings.tsx +++ b/dashboard/src/main/home/provisioner/ProvisionerSettings.tsx @@ -1,5 +1,4 @@ import React, { - Component, useContext, useEffect, useMemo, diff --git a/dashboard/src/main/home/sidebar/AddCluster/AWSCredentialForm.tsx b/dashboard/src/main/home/sidebar/AddCluster/AWSCredentialForm.tsx index f3d0dd4726..2527ff4b9e 100644 --- a/dashboard/src/main/home/sidebar/AddCluster/AWSCredentialForm.tsx +++ b/dashboard/src/main/home/sidebar/AddCluster/AWSCredentialForm.tsx @@ -1,4 +1,4 @@ -import React, { useContext, useEffect, useState } from "react"; +import React, { useContext, useState } from "react"; import styled from "styled-components"; import InputRow from "components/form-components/InputRow"; @@ -9,8 +9,6 @@ import SaveButton from "components/SaveButton"; import api from "shared/api"; import { Context } from "shared/Context"; -import { readableDate } from "shared/string_utils"; -import { Operation, OperationStatus, OperationType } from "shared/types"; type Props = { setCreatedCredential: (aws_integration_id: number) => void; diff --git a/dashboard/src/main/home/sidebar/AddCluster/AWSCredentialList.tsx b/dashboard/src/main/home/sidebar/AddCluster/AWSCredentialList.tsx index dd90c38078..a381249aea 100644 --- a/dashboard/src/main/home/sidebar/AddCluster/AWSCredentialList.tsx +++ b/dashboard/src/main/home/sidebar/AddCluster/AWSCredentialList.tsx @@ -1,17 +1,14 @@ import React, { useContext, useEffect, useState } from "react"; import styled from "styled-components"; -import CloudFormationForm from "components/CloudFormationForm"; import Description from "components/Description"; import Loading from "components/Loading"; import Placeholder from "components/OldPlaceholder"; import ProvisionerFlow from "components/ProvisionerFlow"; -import ProvisionerForm from "components/ProvisionerForm"; import api from "shared/api"; import { Context } from "shared/Context"; -import AWSCredentialForm from "./AWSCredentialForm"; import CredentialList from "./CredentialList"; type Props = { diff --git a/dashboard/src/main/home/sidebar/AddCluster/CredentialList.tsx b/dashboard/src/main/home/sidebar/AddCluster/CredentialList.tsx index b02e6dd2a9..767e51f9c9 100644 --- a/dashboard/src/main/home/sidebar/AddCluster/CredentialList.tsx +++ b/dashboard/src/main/home/sidebar/AddCluster/CredentialList.tsx @@ -1,7 +1,6 @@ import React from "react"; import styled from "styled-components"; -import { readableDate } from "shared/string_utils"; type Props = { selectCredential: (id: number) => void; diff --git a/dashboard/src/main/home/sidebar/ProvisionClusterModal.tsx b/dashboard/src/main/home/sidebar/ProvisionClusterModal.tsx index a9cf9f5af3..5b6155d289 100644 --- a/dashboard/src/main/home/sidebar/ProvisionClusterModal.tsx +++ b/dashboard/src/main/home/sidebar/ProvisionClusterModal.tsx @@ -1,16 +1,13 @@ import React, { useContext, useState } from "react"; import { withRouter, type RouteComponentProps } from "react-router"; import styled from "styled-components"; -import { z } from "zod"; import GCPProvisionerSettings from "components/GCPProvisionerSettings"; -import GPUCostConsent from "components/GPUCostConsent"; import Modal from "components/porter/Modal"; import Spacer from "components/porter/Spacer"; import Text from "components/porter/Text"; import ProvisionerSettings from "components/ProvisionerSettings"; -import api from "shared/api"; import { Context } from "shared/Context"; import { type InfraCredentials } from "shared/types"; diff --git a/dashboard/src/shared/hooks/useOutsideAlerter.ts b/dashboard/src/shared/hooks/useOutsideAlerter.ts index 5595a155bf..aa07b4fc96 100644 --- a/dashboard/src/shared/hooks/useOutsideAlerter.ts +++ b/dashboard/src/shared/hooks/useOutsideAlerter.ts @@ -1,5 +1,5 @@ import type React from "react"; -import { MutableRefObject, RefObject, useEffect, useRef } from "react"; +import { useEffect } from "react"; /** * Hook that alerts clicks outside of the passed ref diff --git a/dashboard/src/test-utils.tsx b/dashboard/src/test-utils.tsx index e257bed321..c2daceb52d 100644 --- a/dashboard/src/test-utils.tsx +++ b/dashboard/src/test-utils.tsx @@ -4,9 +4,8 @@ import { type RenderOptions, type RenderResult, } from "@testing-library/react"; -import { useHistory, useLocation } from "react-router"; import { BrowserRouter } from "react-router-dom"; -import { createGlobalStyle, ThemeProvider } from "styled-components"; +import { ThemeProvider } from "styled-components"; import AuthzProvider from "shared/auth/AuthzContext"; import { ContextProvider } from "shared/Context";