diff --git a/airbyte-webapp/src/components/ui/DatePicker/DatePicker.tsx b/airbyte-webapp/src/components/ui/DatePicker/DatePicker.tsx index c64055111126..40a014ad82cd 100644 --- a/airbyte-webapp/src/components/ui/DatePicker/DatePicker.tsx +++ b/airbyte-webapp/src/components/ui/DatePicker/DatePicker.tsx @@ -162,3 +162,5 @@ export const DatePicker: React.FC = ({ ); }; + +export default DatePicker; diff --git a/airbyte-webapp/src/components/ui/DatePicker/index.ts b/airbyte-webapp/src/components/ui/DatePicker/index.ts index b0b3af5ed415..cfd145ba692e 100644 --- a/airbyte-webapp/src/components/ui/DatePicker/index.ts +++ b/airbyte-webapp/src/components/ui/DatePicker/index.ts @@ -1 +1 @@ -export { DatePicker } from "./DatePicker"; +export { DatePicker as default } from "./DatePicker"; diff --git a/airbyte-webapp/src/packages/cloud/cloudRoutes.tsx b/airbyte-webapp/src/packages/cloud/cloudRoutes.tsx index db4fea04ab25..eb773b2e70f5 100644 --- a/airbyte-webapp/src/packages/cloud/cloudRoutes.tsx +++ b/airbyte-webapp/src/packages/cloud/cloudRoutes.tsx @@ -10,19 +10,6 @@ import { FeatureItem, FeatureSet, useFeatureService } from "hooks/services/Featu import { useApiHealthPoll } from "hooks/services/Health"; import { useQuery } from "hooks/useQuery"; import { useAuthService } from "packages/cloud/services/auth/AuthService"; -import { Auth } from "packages/cloud/views/auth"; -import { CreditsPage } from "packages/cloud/views/credits"; -import MainView from "packages/cloud/views/layout/MainView"; -import { WorkspacesPage } from "packages/cloud/views/workspaces"; -import ConnectionPage from "pages/ConnectionPage"; -import CreationFormPage from "pages/ConnectionPage/pages/CreationFormPage"; -import { AllDestinationsPage } from "pages/destination/AllDestinationsPage"; -import CreateDestinationPage from "pages/destination/CreateDestinationPage"; -import { DestinationItemPage } from "pages/destination/DestinationItemPage"; -import { DestinationOverviewPage } from "pages/destination/DestinationOverviewPage"; -import { DestinationSettingsPage } from "pages/destination/DestinationSettingsPage"; -import SourcesPage from "pages/SourcesPage"; -import { SpeakeasyRedirectPage } from "pages/SpeakeasyRedirectPage"; import { useCurrentWorkspace, WorkspaceServiceProvider } from "services/workspaces/WorkspacesService"; import { setSegmentAnonymousId, useGetSegmentAnonymousId } from "utils/crossDomainUtils"; import { storeUtmFromQuery } from "utils/utmStorage"; @@ -32,9 +19,7 @@ import { RoutePaths, DestinationPaths } from "../../pages/routePaths"; import { CreditStatus } from "./lib/domain/cloudWorkspaces/types"; import { LDExperimentServiceProvider } from "./services/thirdParty/launchdarkly"; import { useGetCloudWorkspace } from "./services/workspaces/CloudWorkspacesService"; -import { DefaultView } from "./views/DefaultView"; import { VerifyEmailAction } from "./views/FirebaseActionRoute"; -import { CloudSettingsPage } from "./views/settings/CloudSettingsPage"; export const CloudRoutes = { Root: "/", @@ -56,6 +41,24 @@ export const CloudRoutes = { FirebaseAction: "/verify-email", } as const; +const MainView = React.lazy(() => import("packages/cloud/views/layout/MainView")); +const WorkspacesPage = React.lazy(() => import("packages/cloud/views/workspaces")); +const Auth = React.lazy(() => import("packages/cloud/views/auth")); +const CreditsPage = React.lazy(() => import("packages/cloud/views/credits")); + +const ConnectionPage = React.lazy(() => import("pages/ConnectionPage")); +const CreationFormPage = React.lazy(() => import("pages/ConnectionPage/pages/CreationFormPage")); +const AllDestinationsPage = React.lazy(() => import("pages/destination/AllDestinationsPage")); +const CreateDestinationPage = React.lazy(() => import("pages/destination/CreateDestinationPage")); +const DestinationItemPage = React.lazy(() => import("pages/destination/DestinationItemPage")); +const DestinationOverviewPage = React.lazy(() => import("pages/destination/DestinationOverviewPage")); +const DestinationSettingsPage = React.lazy(() => import("pages/destination/DestinationSettingsPage")); +const SourcesPage = React.lazy(() => import("pages/SourcesPage")); +const SpeakeasyRedirectPage = React.lazy(() => import("pages/SpeakeasyRedirectPage")); + +const CloudSettingsPage = React.lazy(() => import("./views/settings/CloudSettingsPage")); +const DefaultView = React.lazy(() => import("./views/DefaultView")); + const MainRoutes: React.FC = () => { const { setWorkspaceFeatures } = useFeatureService(); const workspace = useCurrentWorkspace(); diff --git a/airbyte-webapp/src/packages/cloud/views/AcceptEmailInvite.tsx b/airbyte-webapp/src/packages/cloud/views/AcceptEmailInvite.tsx index 616163a28eb4..b5d23368ab39 100644 --- a/airbyte-webapp/src/packages/cloud/views/AcceptEmailInvite.tsx +++ b/airbyte-webapp/src/packages/cloud/views/AcceptEmailInvite.tsx @@ -94,3 +94,5 @@ export const AcceptEmailInvite: React.FC = () => { ); }; + +export default AcceptEmailInvite; diff --git a/airbyte-webapp/src/packages/cloud/views/DefaultView.tsx b/airbyte-webapp/src/packages/cloud/views/DefaultView.tsx index c17843fde634..acfa16b4c214 100644 --- a/airbyte-webapp/src/packages/cloud/views/DefaultView.tsx +++ b/airbyte-webapp/src/packages/cloud/views/DefaultView.tsx @@ -36,3 +36,5 @@ export const DefaultView: React.FC = () => { /> ); }; + +export default DefaultView; diff --git a/airbyte-webapp/src/packages/cloud/views/FirebaseActionRoute.tsx b/airbyte-webapp/src/packages/cloud/views/FirebaseActionRoute.tsx index a41f6c84db18..a0f429829a1c 100644 --- a/airbyte-webapp/src/packages/cloud/views/FirebaseActionRoute.tsx +++ b/airbyte-webapp/src/packages/cloud/views/FirebaseActionRoute.tsx @@ -3,7 +3,6 @@ import { useIntl } from "react-intl"; import { Navigate, useNavigate } from "react-router-dom"; import { useAsync } from "react-use"; -import LoadingPage from "components/LoadingPage"; import { ToastType } from "components/ui/Toast"; import { PageTrackingCodes, useTrackPage } from "hooks/services/Analytics"; @@ -12,8 +11,10 @@ import { useQuery } from "hooks/useQuery"; import { useAuthService } from "packages/cloud/services/auth/AuthService"; import { CloudRoutes } from "../cloudRoutes"; -import { AcceptEmailInvite } from "./AcceptEmailInvite"; -import { ResetPasswordConfirmPage } from "./auth/ConfirmPasswordResetPage"; + +const AcceptEmailInvite = React.lazy(() => import("./AcceptEmailInvite")); +const ResetPasswordConfirmPage = React.lazy(() => import("./auth/ConfirmPasswordResetPage")); +const LoadingPage = React.lazy(() => import("components/LoadingPage")); export enum FirebaseActionMode { VERIFY_EMAIL = "verifyEmail", @@ -53,7 +54,7 @@ export const VerifyEmailAction: React.FC = () => { }; export const FirebaseActionRoute: React.FC = () => { - const { mode } = useQuery(); + const { mode } = useQuery<{ mode: FirebaseActionMode }>(); switch (mode) { case FirebaseActionMode.VERIFY_EMAIL: diff --git a/airbyte-webapp/src/packages/cloud/views/auth/Auth.tsx b/airbyte-webapp/src/packages/cloud/views/auth/Auth.tsx index e366a2d531d5..d614f6dfd520 100644 --- a/airbyte-webapp/src/packages/cloud/views/auth/Auth.tsx +++ b/airbyte-webapp/src/packages/cloud/views/auth/Auth.tsx @@ -11,10 +11,11 @@ import { FirebaseActionRoute } from "packages/cloud/views/FirebaseActionRoute"; import styles from "./Auth.module.scss"; import FormContent from "./components/FormContent"; -import { PersonQuoteCover } from "./components/PersonQuoteCover"; -import { LoginPage } from "./LoginPage"; -import { ResetPasswordPage } from "./ResetPasswordPage"; -import { SignupPage } from "./SignupPage"; + +const PersonQuoteCover = React.lazy(() => import("./components/PersonQuoteCover")); +const LoginPage = React.lazy(() => import("./LoginPage")); +const ResetPasswordPage = React.lazy(() => import("./ResetPasswordPage")); +const SignupPage = React.lazy(() => import("./SignupPage")); const hasValidRightSideUrl = (url?: string): boolean => { if (url) { @@ -33,7 +34,7 @@ const hasValidRightSideUrl = (url?: string): boolean => { return false; }; -const Auth: React.FC = () => { +export const Auth: React.FC = () => { const { pathname } = useLocation(); const { formatMessage } = useIntl(); const { loggedOut } = useAuthService(); @@ -74,5 +75,3 @@ const Auth: React.FC = () => { ); }; - -export default Auth; diff --git a/airbyte-webapp/src/packages/cloud/views/auth/ConfirmPasswordResetPage/index.tsx b/airbyte-webapp/src/packages/cloud/views/auth/ConfirmPasswordResetPage/index.tsx index 308d4aa33f16..b5661d55ae0d 100644 --- a/airbyte-webapp/src/packages/cloud/views/auth/ConfirmPasswordResetPage/index.tsx +++ b/airbyte-webapp/src/packages/cloud/views/auth/ConfirmPasswordResetPage/index.tsx @@ -1 +1,5 @@ +import { ResetPasswordConfirmPage } from "./ConfirmPasswordResetPage"; + export * from "./ConfirmPasswordResetPage"; + +export default ResetPasswordConfirmPage; diff --git a/airbyte-webapp/src/packages/cloud/views/auth/LoginPage/LoginPage.tsx b/airbyte-webapp/src/packages/cloud/views/auth/LoginPage/LoginPage.tsx index 3a1c517032b8..8e8757fc3328 100644 --- a/airbyte-webapp/src/packages/cloud/views/auth/LoginPage/LoginPage.tsx +++ b/airbyte-webapp/src/packages/cloud/views/auth/LoginPage/LoginPage.tsx @@ -26,7 +26,7 @@ const LoginPageValidationSchema = yup.object().shape({ password: yup.string().required("form.empty.error"), }); -const LoginPage: React.FC = () => { +export const LoginPage: React.FC = () => { const { formatMessage } = useIntl(); const { login } = useAuthService(); const query = useQuery<{ from?: string }>(); @@ -120,5 +120,3 @@ const LoginPage: React.FC = () => { ); }; - -export default LoginPage; diff --git a/airbyte-webapp/src/packages/cloud/views/auth/LoginPage/index.tsx b/airbyte-webapp/src/packages/cloud/views/auth/LoginPage/index.tsx index 3d7a720ccafc..35fe74b2a768 100644 --- a/airbyte-webapp/src/packages/cloud/views/auth/LoginPage/index.tsx +++ b/airbyte-webapp/src/packages/cloud/views/auth/LoginPage/index.tsx @@ -1,3 +1 @@ -import LoginPage from "./LoginPage"; - -export { LoginPage }; +export { LoginPage as default } from "./LoginPage"; diff --git a/airbyte-webapp/src/packages/cloud/views/auth/ResetPasswordPage/index.tsx b/airbyte-webapp/src/packages/cloud/views/auth/ResetPasswordPage/index.tsx index ab398d3d365b..19706f3ae869 100644 --- a/airbyte-webapp/src/packages/cloud/views/auth/ResetPasswordPage/index.tsx +++ b/airbyte-webapp/src/packages/cloud/views/auth/ResetPasswordPage/index.tsx @@ -1,3 +1,3 @@ import ResetPasswordPage from "./ResetPasswordPage"; -export { ResetPasswordPage }; +export default ResetPasswordPage; diff --git a/airbyte-webapp/src/packages/cloud/views/auth/SignupPage/index.tsx b/airbyte-webapp/src/packages/cloud/views/auth/SignupPage/index.tsx index 25aef74940c0..435f9f1855ef 100644 --- a/airbyte-webapp/src/packages/cloud/views/auth/SignupPage/index.tsx +++ b/airbyte-webapp/src/packages/cloud/views/auth/SignupPage/index.tsx @@ -1,3 +1,3 @@ import SignupPage from "./SignupPage"; -export { SignupPage }; +export default SignupPage; diff --git a/airbyte-webapp/src/packages/cloud/views/auth/components/PersonQuoteCover/index.tsx b/airbyte-webapp/src/packages/cloud/views/auth/components/PersonQuoteCover/index.tsx index 32a82bcce848..9b0b2601471b 100644 --- a/airbyte-webapp/src/packages/cloud/views/auth/components/PersonQuoteCover/index.tsx +++ b/airbyte-webapp/src/packages/cloud/views/auth/components/PersonQuoteCover/index.tsx @@ -1 +1,3 @@ -export { PersonQuoteCover } from "./PersonQuoteCover"; +import { PersonQuoteCover } from "./PersonQuoteCover"; + +export default PersonQuoteCover; diff --git a/airbyte-webapp/src/packages/cloud/views/auth/index.tsx b/airbyte-webapp/src/packages/cloud/views/auth/index.tsx index 02113077f2c5..b1a43d593c3a 100644 --- a/airbyte-webapp/src/packages/cloud/views/auth/index.tsx +++ b/airbyte-webapp/src/packages/cloud/views/auth/index.tsx @@ -1,3 +1,3 @@ -import Auth from "./Auth"; +import { Auth } from "./Auth"; -export { Auth }; +export default Auth; diff --git a/airbyte-webapp/src/packages/cloud/views/credits/index.tsx b/airbyte-webapp/src/packages/cloud/views/credits/index.tsx index c3f0efb2a208..ec2fa8d2cad8 100644 --- a/airbyte-webapp/src/packages/cloud/views/credits/index.tsx +++ b/airbyte-webapp/src/packages/cloud/views/credits/index.tsx @@ -1,3 +1,3 @@ import CreditsPage from "./CreditsPage"; -export { CreditsPage }; +export default CreditsPage; diff --git a/airbyte-webapp/src/packages/cloud/views/settings/CloudSettingsPage.tsx b/airbyte-webapp/src/packages/cloud/views/settings/CloudSettingsPage.tsx index 8737e29351ec..12b16bd9377d 100644 --- a/airbyte-webapp/src/packages/cloud/views/settings/CloudSettingsPage.tsx +++ b/airbyte-webapp/src/packages/cloud/views/settings/CloudSettingsPage.tsx @@ -118,3 +118,5 @@ export const CloudSettingsPage: React.FC = () => { return ; }; + +export default CloudSettingsPage; diff --git a/airbyte-webapp/src/packages/cloud/views/workspaces/index.tsx b/airbyte-webapp/src/packages/cloud/views/workspaces/index.tsx index 70594dad3abf..78fe36a1baf4 100644 --- a/airbyte-webapp/src/packages/cloud/views/workspaces/index.tsx +++ b/airbyte-webapp/src/packages/cloud/views/workspaces/index.tsx @@ -1,3 +1,3 @@ import WorkspacesPage from "./WorkspacesPage"; -export { WorkspacesPage }; +export default WorkspacesPage; diff --git a/airbyte-webapp/src/pages/ConnectionPage/ConnectionPage.tsx b/airbyte-webapp/src/pages/ConnectionPage/ConnectionPage.tsx index 828278e8557d..78cbab7b3bf3 100644 --- a/airbyte-webapp/src/pages/ConnectionPage/ConnectionPage.tsx +++ b/airbyte-webapp/src/pages/ConnectionPage/ConnectionPage.tsx @@ -7,9 +7,10 @@ import { ResourceNotFoundErrorBoundary } from "views/common/ResorceNotFoundError import { StartOverErrorView } from "views/common/StartOverErrorView"; import { RoutePaths } from "../routePaths"; -import AllConnectionsPage from "./pages/AllConnectionsPage"; -import { ConnectionItemPage } from "./pages/ConnectionItemPage/ConnectionItemPage"; -import { CreationFormPage } from "./pages/CreationFormPage/CreationFormPage"; + +const CreationFormPage = React.lazy(() => import("./pages/CreationFormPage/CreationFormPage")); +const ConnectionItemPage = React.lazy(() => import("./pages/ConnectionItemPage/ConnectionItemPage")); +const AllConnectionsPage = React.lazy(() => import("./pages/AllConnectionsPage")); export const ConnectionPage: React.FC = () => ( }> diff --git a/airbyte-webapp/src/pages/ConnectionPage/pages/ConnectionItemPage/ConnectionItemPage.tsx b/airbyte-webapp/src/pages/ConnectionPage/pages/ConnectionItemPage/ConnectionItemPage.tsx index 6d3b6400ef13..b72522d8f042 100644 --- a/airbyte-webapp/src/pages/ConnectionPage/pages/ConnectionItemPage/ConnectionItemPage.tsx +++ b/airbyte-webapp/src/pages/ConnectionPage/pages/ConnectionItemPage/ConnectionItemPage.tsx @@ -70,3 +70,5 @@ export const ConnectionItemPage = () => { ); }; + +export default ConnectionItemPage; diff --git a/airbyte-webapp/src/pages/ConnectionPage/pages/CreationFormPage/CreationFormPage.tsx b/airbyte-webapp/src/pages/ConnectionPage/pages/CreationFormPage/CreationFormPage.tsx index f1306929f913..647a6ac99001 100644 --- a/airbyte-webapp/src/pages/ConnectionPage/pages/CreationFormPage/CreationFormPage.tsx +++ b/airbyte-webapp/src/pages/ConnectionPage/pages/CreationFormPage/CreationFormPage.tsx @@ -250,3 +250,5 @@ export const CreationFormPage: React.FC = () => { ); }; + +export default CreationFormPage; diff --git a/airbyte-webapp/src/pages/ConnectorBuilderPage/ConnectorBuilderPage.tsx b/airbyte-webapp/src/pages/ConnectorBuilderPage/ConnectorBuilderPage.tsx index cf212e4b0c75..765efd547b00 100644 --- a/airbyte-webapp/src/pages/ConnectorBuilderPage/ConnectorBuilderPage.tsx +++ b/airbyte-webapp/src/pages/ConnectorBuilderPage/ConnectorBuilderPage.tsx @@ -73,3 +73,5 @@ export const ConnectorBuilderPage: React.FC = () => ( ); + +export default ConnectorBuilderPage; diff --git a/airbyte-webapp/src/pages/SourcesPage/SourcesPage.tsx b/airbyte-webapp/src/pages/SourcesPage/SourcesPage.tsx index 57fba58b77c8..ac10deb6bab2 100644 --- a/airbyte-webapp/src/pages/SourcesPage/SourcesPage.tsx +++ b/airbyte-webapp/src/pages/SourcesPage/SourcesPage.tsx @@ -1,14 +1,15 @@ import React from "react"; import { Navigate, Route, Routes } from "react-router-dom"; -import { CreationFormPage } from "pages/ConnectionPage/pages/CreationFormPage/CreationFormPage"; import { ResourceNotFoundErrorBoundary } from "views/common/ResorceNotFoundErrorBoundary"; import { StartOverErrorView } from "views/common/StartOverErrorView"; import { RoutePaths } from "../routePaths"; -import AllSourcesPage from "./pages/AllSourcesPage"; -import CreateSourcePage from "./pages/CreateSourcePage/CreateSourcePage"; -import SourceItemPage from "./pages/SourceItemPage"; + +const AllSourcesPage = React.lazy(() => import("./pages/AllSourcesPage")); +const CreateSourcePage = React.lazy(() => import("./pages/CreateSourcePage/CreateSourcePage")); +const SourceItemPage = React.lazy(() => import("./pages/SourceItemPage")); +const CreationFormPage = React.lazy(() => import("pages/ConnectionPage/pages/CreationFormPage/CreationFormPage")); export const SourcesPage: React.FC = () => ( diff --git a/airbyte-webapp/src/pages/SpeakeasyRedirectPage/index.tsx b/airbyte-webapp/src/pages/SpeakeasyRedirectPage/index.tsx index 11a607c7d6d7..5b1600a7cb24 100644 --- a/airbyte-webapp/src/pages/SpeakeasyRedirectPage/index.tsx +++ b/airbyte-webapp/src/pages/SpeakeasyRedirectPage/index.tsx @@ -1 +1,3 @@ -export { SpeakeasyRedirectPage } from "./SpeakeasyRedirectPage"; +import { SpeakeasyRedirectPage } from "./SpeakeasyRedirectPage"; + +export default SpeakeasyRedirectPage; diff --git a/airbyte-webapp/src/pages/destination/AllDestinationsPage/index.tsx b/airbyte-webapp/src/pages/destination/AllDestinationsPage/index.tsx index 77fff4f24fb8..878d0080eb47 100644 --- a/airbyte-webapp/src/pages/destination/AllDestinationsPage/index.tsx +++ b/airbyte-webapp/src/pages/destination/AllDestinationsPage/index.tsx @@ -1 +1 @@ -export { AllDestinationsPage } from "./AllDestinationsPage"; +export { AllDestinationsPage as default } from "./AllDestinationsPage"; diff --git a/airbyte-webapp/src/pages/destination/DestinationItemPage/index.tsx b/airbyte-webapp/src/pages/destination/DestinationItemPage/index.tsx index d59ca7bff0b0..77cec5e8e2a5 100644 --- a/airbyte-webapp/src/pages/destination/DestinationItemPage/index.tsx +++ b/airbyte-webapp/src/pages/destination/DestinationItemPage/index.tsx @@ -1 +1 @@ -export { DestinationItemPage } from "./DestinationItemPage"; +export { DestinationItemPage as default } from "./DestinationItemPage"; diff --git a/airbyte-webapp/src/pages/destination/DestinationOverviewPage.tsx b/airbyte-webapp/src/pages/destination/DestinationOverviewPage.tsx index b5e8d9d8576c..31cedd071c00 100644 --- a/airbyte-webapp/src/pages/destination/DestinationOverviewPage.tsx +++ b/airbyte-webapp/src/pages/destination/DestinationOverviewPage.tsx @@ -75,3 +75,5 @@ export const DestinationOverviewPage = () => { ); }; + +export default DestinationOverviewPage; diff --git a/airbyte-webapp/src/pages/destination/DestinationSettingsPage/index.ts b/airbyte-webapp/src/pages/destination/DestinationSettingsPage/index.ts index d8c33a61eec3..22374d3a210d 100644 --- a/airbyte-webapp/src/pages/destination/DestinationSettingsPage/index.ts +++ b/airbyte-webapp/src/pages/destination/DestinationSettingsPage/index.ts @@ -1 +1 @@ -export { DestinationSettingsPage } from "./DestinationSettingsPage"; +export { DestinationSettingsPage as default } from "./DestinationSettingsPage"; diff --git a/airbyte-webapp/src/pages/routes.tsx b/airbyte-webapp/src/pages/routes.tsx index 2d758484a771..9b4dc3cd7c43 100644 --- a/airbyte-webapp/src/pages/routes.tsx +++ b/airbyte-webapp/src/pages/routes.tsx @@ -13,18 +13,20 @@ import { CompleteOauthRequest } from "views/CompleteOauthRequest"; import MainView from "views/layout/MainView"; import { WorkspaceRead } from "../core/request/AirbyteClient"; -import ConnectionPage from "./ConnectionPage"; -import CreationFormPage from "./ConnectionPage/pages/CreationFormPage"; -import { ConnectorBuilderPage } from "./ConnectorBuilderPage/ConnectorBuilderPage"; -import { AllDestinationsPage } from "./destination/AllDestinationsPage"; -import CreateDestinationPage from "./destination/CreateDestinationPage"; -import { DestinationItemPage } from "./destination/DestinationItemPage"; -import { DestinationOverviewPage } from "./destination/DestinationOverviewPage"; -import { DestinationSettingsPage } from "./destination/DestinationSettingsPage"; -import PreferencesPage from "./PreferencesPage"; import { RoutePaths, DestinationPaths } from "./routePaths"; -import SettingsPage from "./SettingsPage"; -import SourcesPage from "./SourcesPage"; + +const ConnectionPage = React.lazy(() => import("./ConnectionPage")); +const CreationFormPage = React.lazy(() => import("./ConnectionPage/pages/CreationFormPage")); +const ConnectorBuilderPage = React.lazy(() => import("./ConnectorBuilderPage/ConnectorBuilderPage")); + +const AllDestinationsPage = React.lazy(() => import("./destination/AllDestinationsPage")); +const CreateDestinationPage = React.lazy(() => import("./destination/CreateDestinationPage")); +const DestinationItemPage = React.lazy(() => import("./destination/DestinationItemPage")); +const DestinationOverviewPage = React.lazy(() => import("./destination/DestinationOverviewPage")); +const DestinationSettingsPage = React.lazy(() => import("./destination/DestinationSettingsPage")); +const PreferencesPage = React.lazy(() => import("./PreferencesPage")); +const SettingsPage = React.lazy(() => import("./SettingsPage")); +const SourcesPage = React.lazy(() => import("./SourcesPage")); const useAddAnalyticsContextForWorkspace = (workspace: WorkspaceRead): void => { const analyticsContext = useMemo( diff --git a/airbyte-webapp/src/views/Connector/ConnectorForm/components/Property/Control.tsx b/airbyte-webapp/src/views/Connector/ConnectorForm/components/Property/Control.tsx index 11a1c3a1502d..474b0b71166b 100644 --- a/airbyte-webapp/src/views/Connector/ConnectorForm/components/Property/Control.tsx +++ b/airbyte-webapp/src/views/Connector/ConnectorForm/components/Property/Control.tsx @@ -1,7 +1,6 @@ import { Field, useField } from "formik"; import React, { useCallback } from "react"; -import { DatePicker } from "components/ui/DatePicker"; import { DropDown } from "components/ui/DropDown"; import { Input } from "components/ui/Input"; import { Multiselect } from "components/ui/Multiselect"; @@ -14,6 +13,8 @@ import { isDefined } from "utils/common"; import SecretConfirmationControl from "./SecretConfirmationControl"; +const DatePicker = React.lazy(() => import("components/ui/DatePicker")); + interface ControlProps { property: FormBaseItem; name: string; diff --git a/airbyte-webapp/src/views/Connector/ConnectorForm/components/Sections/PropertySection.tsx b/airbyte-webapp/src/views/Connector/ConnectorForm/components/Sections/PropertySection.tsx index 14de86966708..665e19476548 100644 --- a/airbyte-webapp/src/views/Connector/ConnectorForm/components/Sections/PropertySection.tsx +++ b/airbyte-webapp/src/views/Connector/ConnectorForm/components/Sections/PropertySection.tsx @@ -17,7 +17,7 @@ interface PropertySectionProps { disabled?: boolean; } -const PropertySection: React.FC = ({ property, path, disabled }) => { +export const PropertySection: React.FC = ({ property, path, disabled }) => { const propertyPath = path ?? property.path; const formikBag = useField(propertyPath); const [field, meta] = formikBag; @@ -57,5 +57,3 @@ const PropertySection: React.FC = ({ property, path, disab ); }; - -export { PropertySection };