diff --git a/src/auth/components/AdvertiserAgreed.tsx b/src/auth/components/AdvertiserAgreed.tsx index 45b7b4f0..1b6b448c 100644 --- a/src/auth/components/AdvertiserAgreed.tsx +++ b/src/auth/components/AdvertiserAgreed.tsx @@ -1,7 +1,6 @@ import React, { useState } from "react"; import Typography from "@mui/material/Typography"; import { - Box, Card, Checkbox, Container, diff --git a/src/auth/hooks/mutations/useGetLink.ts b/src/auth/hooks/mutations/useGetLink.ts index 396f29c8..46039b7f 100644 --- a/src/auth/hooks/mutations/useGetLink.ts +++ b/src/auth/hooks/mutations/useGetLink.ts @@ -1,6 +1,5 @@ import { useCallback, useState } from "react"; -import { useAuthContext } from "auth/context/auth.hook"; -import { getCredentials, getLink } from "auth/lib"; +import { getLink } from "auth/lib"; interface Options { onError?: (msg: string) => void; diff --git a/src/auth/views/AuthVerify.tsx b/src/auth/views/AuthVerify.tsx index e8d2f58f..49a5e97e 100644 --- a/src/auth/views/AuthVerify.tsx +++ b/src/auth/views/AuthVerify.tsx @@ -1,9 +1,8 @@ import { AuthContainer } from "auth/views/components/AuthContainer"; import { useAuthorize } from "auth/hooks/queries/useAuthorize"; import React from "react"; -import { useHistory } from "react-router-dom"; +import { Link as RouterLink, useHistory } from "react-router-dom"; import { CircularProgress, Link, Stack, Typography } from "@mui/material"; -import { Link as RouterLink } from "react-router-dom"; import VerifiedIcon from "@mui/icons-material/Verified"; import CancelOutlinedIcon from "@mui/icons-material/CancelOutlined"; diff --git a/src/auth/views/Login.tsx b/src/auth/views/Login.tsx index 3c9bb3c8..d452536c 100644 --- a/src/auth/views/Login.tsx +++ b/src/auth/views/Login.tsx @@ -1,7 +1,7 @@ import { Alert, Link, TextField, Typography } from "@mui/material"; import { LoadingButton } from "@mui/lab"; import React, { useState } from "react"; -import { useHistory, Link as RouterLink } from "react-router-dom"; +import { Link as RouterLink, useHistory } from "react-router-dom"; import { useSignIn } from "auth/hooks/mutations/useSignIn"; import { AuthContainer } from "auth/views/components/AuthContainer"; diff --git a/src/checkout/hooks/useValidatePaymentSession.ts b/src/checkout/hooks/useValidatePaymentSession.ts index e49e2cd9..c1b877d1 100644 --- a/src/checkout/hooks/useValidatePaymentSession.ts +++ b/src/checkout/hooks/useValidatePaymentSession.ts @@ -1,5 +1,4 @@ import { useEffect, useState } from "react"; -import { buildAdServerEndpoint } from "util/environment"; import { fetchPaymentSession } from "checkout/lib"; interface Props { diff --git a/src/components/Box/BoxContainer.tsx b/src/components/Box/BoxContainer.tsx index 1d97c38f..8983f85a 100644 --- a/src/components/Box/BoxContainer.tsx +++ b/src/components/Box/BoxContainer.tsx @@ -1,5 +1,5 @@ import React, { PropsWithChildren } from "react"; -import { Box, Container, Typography } from "@mui/material"; +import { Box, Typography } from "@mui/material"; export function BoxContainer( props: { header?: React.ReactNode } & PropsWithChildren, diff --git a/src/components/Collapse/CollapseBox.tsx b/src/components/Collapse/CollapseBox.tsx index 3fb06d8f..1fe90905 100644 --- a/src/components/Collapse/CollapseBox.tsx +++ b/src/components/Collapse/CollapseBox.tsx @@ -2,8 +2,6 @@ import { Accordion, AccordionDetails, AccordionSummary, - Alert, - AlertTitle, Box, Typography, } from "@mui/material"; diff --git a/src/components/Country/CountryPicker.tsx b/src/components/Country/CountryPicker.tsx index c6c1b90d..073073dd 100644 --- a/src/components/Country/CountryPicker.tsx +++ b/src/components/Country/CountryPicker.tsx @@ -1,4 +1,4 @@ -import { Alert, Autocomplete, TextField } from "@mui/material"; +import { Autocomplete, TextField } from "@mui/material"; import { useField } from "formik"; import React from "react"; import { useCountries } from "components/Country/useCountries"; diff --git a/src/components/EnhancedTable/renderers.tsx b/src/components/EnhancedTable/renderers.tsx index ca679f6e..35bb89f1 100644 --- a/src/components/EnhancedTable/renderers.tsx +++ b/src/components/EnhancedTable/renderers.tsx @@ -12,12 +12,10 @@ import { } from "graphql/campaign.generated"; import { AdvertiserCampaignsDocument } from "graphql/advertiser.generated"; import { - AdSetFragment, useUpdateAdMutation, useUpdateAdSetMutation, } from "graphql/ad-set.generated"; import { OnOff } from "../Switch/OnOff"; -import { CampaignSource } from "graphql/types"; import { AdDetails } from "user/ads/AdList"; import { displayFromCampaignState } from "util/displayState"; import { AdSetDetails } from "user/adSet/AdSetList"; diff --git a/src/components/Error/ErrorDetail.tsx b/src/components/Error/ErrorDetail.tsx index 88ee0f5e..b79cffd3 100644 --- a/src/components/Error/ErrorDetail.tsx +++ b/src/components/Error/ErrorDetail.tsx @@ -1,4 +1,4 @@ -import { ApolloError, ServerError, ServerParseError } from "@apollo/client"; +import { ApolloError } from "@apollo/client"; import ExpandMoreIcon from "@mui/icons-material/ExpandMore"; import { Accordion, diff --git a/src/components/Steps/NextAndBack.tsx b/src/components/Steps/NextAndBack.tsx index 3a16b8ba..69427d67 100644 --- a/src/components/Steps/NextAndBack.tsx +++ b/src/components/Steps/NextAndBack.tsx @@ -1,4 +1,4 @@ -import { Button, Stack, stepClasses } from "@mui/material"; +import { Button, Stack } from "@mui/material"; import React from "react"; interface Props { diff --git a/src/components/Steps/StepDrawer.tsx b/src/components/Steps/StepDrawer.tsx index c124564d..8c41f6a3 100644 --- a/src/components/Steps/StepDrawer.tsx +++ b/src/components/Steps/StepDrawer.tsx @@ -1,20 +1,17 @@ -import React, { PropsWithChildren, useRef, useState } from "react"; +import React, { PropsWithChildren, useRef } from "react"; import { Box, - Button, CssBaseline, Drawer, - ListItemButton, Stack, Step, StepButton, StepContent, Stepper, Toolbar, - Typography, } from "@mui/material"; import { NextAndBack } from "components/Steps/NextAndBack"; -import { Link as RouterLink, useHistory } from "react-router-dom"; +import { useHistory } from "react-router-dom"; import { ActionButtons } from "components/Steps/ActionButtons"; const drawerWidth = 250; diff --git a/src/components/Steps/StepsButton.tsx b/src/components/Steps/StepsButton.tsx index b7c3ef64..9c2dea86 100644 --- a/src/components/Steps/StepsButton.tsx +++ b/src/components/Steps/StepsButton.tsx @@ -1,12 +1,4 @@ -import { - Box, - Button, - Stack, - Step, - StepLabel, - Stepper, - Typography, -} from "@mui/material"; +import { Box, Step, StepLabel, Stepper } from "@mui/material"; import React, { useState } from "react"; import { NextAndBack } from "components/Steps/NextAndBack"; diff --git a/src/components/Url/use-url-validation.ts b/src/components/Url/use-url-validation.ts index badf14f1..2dca4d1a 100644 --- a/src/components/Url/use-url-validation.ts +++ b/src/components/Url/use-url-validation.ts @@ -1,6 +1,6 @@ import { - ValidateTargetUrlQuery, useValidateTargetUrlLazyQuery, + ValidateTargetUrlQuery, } from "graphql/url.generated"; import _ from "lodash"; import { useEffect, useMemo, useState } from "react"; diff --git a/src/form/FormikHelpers.tsx b/src/form/FormikHelpers.tsx index f2c04b7b..b9ef49cd 100644 --- a/src/form/FormikHelpers.tsx +++ b/src/form/FormikHelpers.tsx @@ -4,7 +4,6 @@ import React, { useEffect, } from "react"; import { - Button, FormControl, FormControlLabel, FormHelperText, diff --git a/src/graphql/ad-set.generated.tsx b/src/graphql/ad-set.generated.tsx index f555b739..c3d64ee9 100644 --- a/src/graphql/ad-set.generated.tsx +++ b/src/graphql/ad-set.generated.tsx @@ -1,8 +1,9 @@ import * as Types from "./types"; +import * as Apollo from "@apollo/client"; import { gql } from "@apollo/client"; import { CreativeFragmentDoc } from "./creative.generated"; -import * as Apollo from "@apollo/client"; + const defaultOptions = {} as const; export type AdSetFragment = { __typename?: "AdSet"; diff --git a/src/graphql/advertiser.generated.tsx b/src/graphql/advertiser.generated.tsx index 82cde162..ca1215a3 100644 --- a/src/graphql/advertiser.generated.tsx +++ b/src/graphql/advertiser.generated.tsx @@ -1,8 +1,9 @@ import * as Types from "./types"; +import * as Apollo from "@apollo/client"; import { gql } from "@apollo/client"; import { CampaignSummaryFragmentDoc } from "./campaign.generated"; -import * as Apollo from "@apollo/client"; + const defaultOptions = {} as const; export type AdvertiserSummaryFragment = { __typename?: "Advertiser"; diff --git a/src/graphql/analytics-overview.generated.tsx b/src/graphql/analytics-overview.generated.tsx index d686482c..741cd541 100644 --- a/src/graphql/analytics-overview.generated.tsx +++ b/src/graphql/analytics-overview.generated.tsx @@ -1,7 +1,8 @@ import * as Types from "./types"; -import { gql } from "@apollo/client"; import * as Apollo from "@apollo/client"; +import { gql } from "@apollo/client"; + const defaultOptions = {} as const; export type EngagementFragment = { __typename?: "Engagement"; diff --git a/src/graphql/campaign.generated.tsx b/src/graphql/campaign.generated.tsx index 0cf619a8..bb7443a4 100644 --- a/src/graphql/campaign.generated.tsx +++ b/src/graphql/campaign.generated.tsx @@ -1,8 +1,9 @@ import * as Types from "./types"; +import * as Apollo from "@apollo/client"; import { gql } from "@apollo/client"; import { AdSetFragmentDoc } from "./ad-set.generated"; -import * as Apollo from "@apollo/client"; + const defaultOptions = {} as const; export type CampaignFragment = { __typename?: "Campaign"; diff --git a/src/graphql/common.generated.tsx b/src/graphql/common.generated.tsx index 49be7de1..129af17d 100644 --- a/src/graphql/common.generated.tsx +++ b/src/graphql/common.generated.tsx @@ -1,7 +1,8 @@ import * as Types from "./types"; -import { gql } from "@apollo/client"; import * as Apollo from "@apollo/client"; +import { gql } from "@apollo/client"; + const defaultOptions = {} as const; export type GeocodeFragment = { __typename?: "ActiveGeocodesEntry"; diff --git a/src/graphql/creative.generated.tsx b/src/graphql/creative.generated.tsx index 8a4a8126..2b2975b6 100644 --- a/src/graphql/creative.generated.tsx +++ b/src/graphql/creative.generated.tsx @@ -1,7 +1,8 @@ import * as Types from "./types"; -import { gql } from "@apollo/client"; import * as Apollo from "@apollo/client"; +import { gql } from "@apollo/client"; + const defaultOptions = {} as const; export type CreativeFragment = { __typename?: "Creative"; diff --git a/src/graphql/url.generated.tsx b/src/graphql/url.generated.tsx index 52c4f0db..5aea178d 100644 --- a/src/graphql/url.generated.tsx +++ b/src/graphql/url.generated.tsx @@ -1,7 +1,8 @@ import * as Types from "./types"; -import { gql } from "@apollo/client"; import * as Apollo from "@apollo/client"; +import { gql } from "@apollo/client"; + const defaultOptions = {} as const; export type ValidateTargetUrlQueryVariables = Types.Exact<{ url: Types.Scalars["String"]; diff --git a/src/graphql/user.generated.tsx b/src/graphql/user.generated.tsx index 8126dd3a..ad6a2070 100644 --- a/src/graphql/user.generated.tsx +++ b/src/graphql/user.generated.tsx @@ -1,6 +1,5 @@ -import * as Types from "./types"; - import { gql } from "@apollo/client"; + export type UserFragment = { __typename?: "User"; email: string; diff --git a/src/user/adSet/AdSetList.tsx b/src/user/adSet/AdSetList.tsx index 17a0074a..11da8a1e 100644 --- a/src/user/adSet/AdSetList.tsx +++ b/src/user/adSet/AdSetList.tsx @@ -3,7 +3,6 @@ import { ColumnDescriptor, StandardRenderers } from "components/EnhancedTable"; import { Chip } from "@mui/material"; import { Status } from "components/Campaigns/Status"; import _ from "lodash"; -import { isAfterEndDate } from "util/isAfterEndDate"; import { adSetOnOffState } from "components/EnhancedTable/renderers"; import { CampaignAdsFragment } from "graphql/campaign.generated"; import { CampaignSource } from "graphql/types"; diff --git a/src/user/analytics/analyticsOverview/components/EngagementHeader.tsx b/src/user/analytics/analyticsOverview/components/EngagementHeader.tsx index 15c31e98..cadf93c9 100644 --- a/src/user/analytics/analyticsOverview/components/EngagementHeader.tsx +++ b/src/user/analytics/analyticsOverview/components/EngagementHeader.tsx @@ -1,6 +1,5 @@ import React from "react"; -import { Box, Button, Stack, Tab, Tabs, Typography } from "@mui/material"; -import { EngagementChartType } from "../types"; +import { Box, Button, Stack, Typography } from "@mui/material"; import { Status } from "components/Campaigns/Status"; import { CampaignSummaryFragment } from "graphql/campaign.generated"; diff --git a/src/user/analytics/analyticsOverview/components/LiveFeed.tsx b/src/user/analytics/analyticsOverview/components/LiveFeed.tsx index a42b4ffc..63b99784 100644 --- a/src/user/analytics/analyticsOverview/components/LiveFeed.tsx +++ b/src/user/analytics/analyticsOverview/components/LiveFeed.tsx @@ -1,5 +1,5 @@ import React from "react"; -import { Box, Chip, Stack, Typography } from "@mui/material"; +import { Box, Chip, Typography } from "@mui/material"; import { OverviewDetail, StatsMetric } from "../types"; interface OverviewProps extends OverviewDetail { diff --git a/src/user/analytics/analyticsOverview/components/MetricFilter.tsx b/src/user/analytics/analyticsOverview/components/MetricFilter.tsx index 98d40aaf..eb4f0c61 100644 --- a/src/user/analytics/analyticsOverview/components/MetricFilter.tsx +++ b/src/user/analytics/analyticsOverview/components/MetricFilter.tsx @@ -1,5 +1,5 @@ import MetricSelect from "user/analytics/analyticsOverview/components/MetricSelect"; -import React, { useState } from "react"; +import React from "react"; import { Box, Stack, Switch, Tooltip, Typography } from "@mui/material"; import { decideValueAttribute } from "user/analytics/analyticsOverview/lib/overview.library"; import { Metrics, StatsMetric } from "user/analytics/analyticsOverview/types"; diff --git a/src/user/analytics/analyticsOverview/lib/overview.library.ts b/src/user/analytics/analyticsOverview/lib/overview.library.ts index a6dcbf5f..3290efba 100644 --- a/src/user/analytics/analyticsOverview/lib/overview.library.ts +++ b/src/user/analytics/analyticsOverview/lib/overview.library.ts @@ -7,10 +7,7 @@ import { StatsMetric, Tooltip, } from "user/analytics/analyticsOverview/types"; -import { - CampaignWithEngagementsFragment, - EngagementFragment, -} from "graphql/analytics-overview.generated"; +import { EngagementFragment } from "graphql/analytics-overview.generated"; type MetricDataSet = { metric1DataSet: number[][]; diff --git a/src/user/analytics/analyticsOverview/reports/campaign/EngagementsOverview.tsx b/src/user/analytics/analyticsOverview/reports/campaign/EngagementsOverview.tsx index cad296dd..6d7d41b7 100644 --- a/src/user/analytics/analyticsOverview/reports/campaign/EngagementsOverview.tsx +++ b/src/user/analytics/analyticsOverview/reports/campaign/EngagementsOverview.tsx @@ -17,7 +17,6 @@ import EngagementHeader from "../../components/EngagementHeader"; import LiveFeed from "../../components/LiveFeed"; import { CampaignFormat } from "graphql/types"; import { ErrorDetail } from "components/Error/ErrorDetail"; -import { DashboardButton } from "components/Button/DashboardButton"; import { ApolloError } from "@apollo/client"; import _ from "lodash"; diff --git a/src/user/analytics/analyticsOverview/reports/os/OsOverview.tsx b/src/user/analytics/analyticsOverview/reports/os/OsOverview.tsx index 6b525ec7..f2f17a81 100644 --- a/src/user/analytics/analyticsOverview/reports/os/OsOverview.tsx +++ b/src/user/analytics/analyticsOverview/reports/os/OsOverview.tsx @@ -1,15 +1,9 @@ import { Box, Stack } from "@mui/material"; import React from "react"; -import { - CampaignWithEngagementsFragment, - EngagementFragment, -} from "graphql/analytics-overview.generated"; +import { EngagementFragment } from "graphql/analytics-overview.generated"; import { mapOsStats, processOs } from "../../lib/os.library"; import { OsPieChart } from "./components/OsPieChart"; import { OsBarChart } from "./components/OsBarChart"; -import { CampaignFragment } from "graphql/campaign.generated"; -import { CampaignFormat } from "graphql/types"; -import { CardContainer } from "components/Card/CardContainer"; interface Props { engagements: EngagementFragment[]; diff --git a/src/user/hooks/useAdvertiserCreatives.ts b/src/user/hooks/useAdvertiserCreatives.ts index b1d08107..3117fe85 100644 --- a/src/user/hooks/useAdvertiserCreatives.ts +++ b/src/user/hooks/useAdvertiserCreatives.ts @@ -2,7 +2,7 @@ import { useAdvertiserCreativesQuery } from "graphql/creative.generated"; import { useAdvertiser } from "auth/hooks/queries/useAdvertiser"; import { useFormikContext } from "formik"; import { CampaignForm, Creative } from "user/views/adsManager/types"; -import _, { flatMap } from "lodash"; +import _ from "lodash"; export function useAdvertiserCreatives(): Creative[] { const { advertiser } = useAdvertiser(); diff --git a/src/user/library/index.test.ts b/src/user/library/index.test.ts index 2e7d432a..873cd2bb 100644 --- a/src/user/library/index.test.ts +++ b/src/user/library/index.test.ts @@ -1,5 +1,5 @@ import { CampaignFragment } from "graphql/campaign.generated"; -import { it, describe, expect } from "vitest"; +import { describe, expect, it } from "vitest"; import { editCampaignValues, transformCreative } from "."; import { CampaignFormat, diff --git a/src/user/settings/Settings.tsx b/src/user/settings/Settings.tsx index cdb88aa6..7ef3f851 100644 --- a/src/user/settings/Settings.tsx +++ b/src/user/settings/Settings.tsx @@ -6,7 +6,6 @@ import { Box, Button, Container, - Divider, FormControl, InputLabel, MenuItem, diff --git a/src/user/views/adsManager/views/advanced/components/adSet/fields/AdSetAds.tsx b/src/user/views/adsManager/views/advanced/components/adSet/fields/AdSetAds.tsx index c2539809..ff3a2329 100644 --- a/src/user/views/adsManager/views/advanced/components/adSet/fields/AdSetAds.tsx +++ b/src/user/views/adsManager/views/advanced/components/adSet/fields/AdSetAds.tsx @@ -1,6 +1,6 @@ import { CardContainer } from "components/Card/CardContainer"; import { Autocomplete, Checkbox, TextField } from "@mui/material"; -import React, { useEffect } from "react"; +import React from "react"; import { useRecentlyCreatedAdvertiserCreatives } from "user/hooks/useAdvertiserCreatives"; import CheckBoxOutlineBlankIcon from "@mui/icons-material/CheckBoxOutlineBlank"; import CheckBoxIcon from "@mui/icons-material/CheckBox"; diff --git a/src/user/views/adsManager/views/advanced/components/adSet/fields/ConversionField.tsx b/src/user/views/adsManager/views/advanced/components/adSet/fields/ConversionField.tsx index dd7a04c9..17f93b7e 100644 --- a/src/user/views/adsManager/views/advanced/components/adSet/fields/ConversionField.tsx +++ b/src/user/views/adsManager/views/advanced/components/adSet/fields/ConversionField.tsx @@ -1,4 +1,4 @@ -import { Divider, Link, Stack, Typography } from "@mui/material"; +import { Link, Stack, Typography } from "@mui/material"; import { ConversionFields } from "components/Conversion/ConversionFields"; import React from "react"; import { FieldArray, useField } from "formik"; diff --git a/src/user/views/adsManager/views/advanced/components/adSet/fields/PickerFields.tsx b/src/user/views/adsManager/views/advanced/components/adSet/fields/PickerFields.tsx index 1850174d..f8b0a267 100644 --- a/src/user/views/adsManager/views/advanced/components/adSet/fields/PickerFields.tsx +++ b/src/user/views/adsManager/views/advanced/components/adSet/fields/PickerFields.tsx @@ -1,4 +1,4 @@ -import { Divider, Typography } from "@mui/material"; +import { Typography } from "@mui/material"; import { SegmentPicker } from "components/Segment/SegmentPicker"; import { PlatformPicker } from "components/Platform/PlatformPicker"; import React from "react"; diff --git a/src/user/views/adsManager/views/advanced/components/campaign/fields/LocationField.tsx b/src/user/views/adsManager/views/advanced/components/campaign/fields/LocationField.tsx index c0c9d660..edc591e2 100644 --- a/src/user/views/adsManager/views/advanced/components/campaign/fields/LocationField.tsx +++ b/src/user/views/adsManager/views/advanced/components/campaign/fields/LocationField.tsx @@ -1,4 +1,4 @@ -import { Box, Divider, Typography } from "@mui/material"; +import { Typography } from "@mui/material"; import { LocationPicker } from "components/Location/LocationPicker"; import React from "react"; import { CardContainer } from "components/Card/CardContainer"; diff --git a/src/user/views/adsManager/views/advanced/components/form/components/BaseForm.tsx b/src/user/views/adsManager/views/advanced/components/form/components/BaseForm.tsx index 08c60e57..95ec59d5 100644 --- a/src/user/views/adsManager/views/advanced/components/form/components/BaseForm.tsx +++ b/src/user/views/adsManager/views/advanced/components/form/components/BaseForm.tsx @@ -2,7 +2,6 @@ import { Form } from "formik"; import { Review } from "../../review/Review"; import React from "react"; import { CampaignSettings } from "user/views/adsManager/views/advanced/components/campaign/CampaignSettings"; -import { BudgetField } from "user/views/adsManager/views/advanced/components/campaign/fields/BudgetField"; import { StepDrawer } from "components/Steps/StepDrawer"; import { PaymentButton } from "user/views/adsManager/views/advanced/components/form/components/PaymentButton"; import { NewAd } from "user/ads/NewAd"; diff --git a/src/user/views/adsManager/views/advanced/components/form/components/PaymentButton.tsx b/src/user/views/adsManager/views/advanced/components/form/components/PaymentButton.tsx index ae64a0fc..41fd62ec 100644 --- a/src/user/views/adsManager/views/advanced/components/form/components/PaymentButton.tsx +++ b/src/user/views/adsManager/views/advanced/components/form/components/PaymentButton.tsx @@ -2,7 +2,6 @@ import { FormikSubmitButton } from "form/FormikHelpers"; import React from "react"; import { useFormikContext } from "formik"; import { CampaignForm } from "user/views/adsManager/types"; -import { PaymentType } from "graphql/types"; export function PaymentButton(props: { isEdit: boolean }) { const { values } = useFormikContext();