From fe8c1fbc476201be6a2817525df59ba5982de2bb Mon Sep 17 00:00:00 2001 From: Pratik <54103265+PratikAwaik@users.noreply.github.com> Date: Fri, 11 Oct 2024 04:46:16 +0530 Subject: [PATCH] feat: product configuration pages loading skeletons (#3262) Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com> --- apps/web/app/(app)/components/LoadingCard.tsx | 24 ++ .../(setup)/app-connection/loading.tsx | 146 ++------ .../product/(setup)/app-connection/page.tsx | 12 +- .../product/api-keys/loading.tsx | 91 +---- .../components/ProductConfigNavigation.tsx | 10 +- .../product/general/loading.tsx | 111 +----- .../product/languages/loading.tsx | 33 ++ .../[environmentId]/product/look/loading.tsx | 319 +++++++----------- .../[environmentId]/product/tags/loading.tsx | 42 +++ .../components/AccountSettingsNavbar.tsx | 6 +- .../(account)/notifications/loading.tsx | 51 +-- .../settings/(account)/profile/loading.tsx | 51 +-- .../components/OrganizationSettingsNavbar.tsx | 6 +- .../(organization)/enterprise/loading.tsx | 31 +- .../(organization)/members/loading.tsx | 54 +-- .../(organization)/billing/loading.tsx | 31 +- .../components/edit-language.tsx | 34 +- .../components/language-labels.tsx | 32 ++ 18 files changed, 372 insertions(+), 712 deletions(-) create mode 100644 apps/web/app/(app)/components/LoadingCard.tsx create mode 100644 apps/web/app/(app)/environments/[environmentId]/product/languages/loading.tsx create mode 100644 apps/web/app/(app)/environments/[environmentId]/product/tags/loading.tsx create mode 100644 packages/ee/multi-language/components/language-labels.tsx diff --git a/apps/web/app/(app)/components/LoadingCard.tsx b/apps/web/app/(app)/components/LoadingCard.tsx new file mode 100644 index 0000000000..be6d80c073 --- /dev/null +++ b/apps/web/app/(app)/components/LoadingCard.tsx @@ -0,0 +1,24 @@ +import { SettingsCard } from "@/app/(app)/environments/[environmentId]/settings/components/SettingsCard"; +import { cn } from "@formbricks/lib/cn"; + +export const LoadingCard = ({ + title, + description, + skeletonLines, +}: { + title: string; + description: string; + skeletonLines: Array<{ classes: string }>; +}) => { + return ( + +
+ {skeletonLines.map((line, index) => ( +
+
+
+ ))} +
+
+ ); +}; diff --git a/apps/web/app/(app)/environments/[environmentId]/product/(setup)/app-connection/loading.tsx b/apps/web/app/(app)/environments/[environmentId]/product/(setup)/app-connection/loading.tsx index 9e23ba1582..14b4abf000 100644 --- a/apps/web/app/(app)/environments/[environmentId]/product/(setup)/app-connection/loading.tsx +++ b/apps/web/app/(app)/environments/[environmentId]/product/(setup)/app-connection/loading.tsx @@ -1,138 +1,46 @@ "use client"; -import { BrushIcon, KeyIcon, LanguagesIcon, ListChecksIcon, TagIcon, UsersIcon } from "lucide-react"; -import { usePathname } from "next/navigation"; -import { cn } from "@formbricks/lib/cn"; +import { LoadingCard } from "@/app/(app)/components/LoadingCard"; +import { ProductConfigNavigation } from "@/app/(app)/environments/[environmentId]/product/components/ProductConfigNavigation"; import { PageContentWrapper } from "@formbricks/ui/components/PageContentWrapper"; import { PageHeader } from "@formbricks/ui/components/PageHeader"; -const LoadingCard = ({ title, description, skeletonLines }) => { - return ( -
-
-

{title}

-

{description}

-
-
-
- {skeletonLines.map((line, index) => ( -
-
-
- ))} -
-
-
- ); -}; - const Loading = () => { - const pathname = usePathname(); - const cards = [ { - title: "Widget Status", - description: "Check if the Formbricks widget is alive and kicking.", - skeletonLines: [{ classes: " h-44 max-w-full rounded-md" }], + title: "Website & App Connection Status", + description: "Check if your app is successfully connected with Formbricks. Reload page to recheck.", + skeletonLines: [{ classes: " h-44 max-w-full rounded-lg" }], + }, + { + title: "How to setup", + description: "Follow these steps to setup the Formbricks widget within your app.", + skeletonLines: [ + { classes: "h-12 w-24 rounded-lg" }, + { classes: "h-10 w-60 rounded-lg" }, + { classes: "h-10 w-60 rounded-lg" }, + { classes: "h-12 w-24 rounded-lg" }, + { classes: "h-10 w-60 rounded-lg" }, + { classes: "h-10 w-60 rounded-lg" }, + ], }, { title: "Your EnvironmentId", description: "This id uniquely identifies this Formbricks environment.", - skeletonLines: [{ classes: "h-6 w-4/6 rounded-full" }], - }, - { - title: "How To Setup", - description: "Follow these steps to setup the Formbricks widget within your app", - skeletonLines: [ - { classes: "h-6 w-24 rounded-full" }, - { classes: "h-4 w-60 rounded-full" }, - { classes: "h-4 w-60 rounded-full" }, - { classes: "h-6 w-24 rounded-full" }, - { classes: "h-4 w-60 rounded-full" }, - { classes: "h-4 w-60 rounded-full" }, - ], - }, - ]; - - let navigation = [ - { - id: "general", - label: "General", - icon: , - current: pathname?.includes("/general"), - }, - { - id: "look", - label: "Look & Feel", - icon: , - current: pathname?.includes("/look"), - }, - { - id: "languages", - label: "Survey Languages", - icon: , - hidden: true, - current: pathname?.includes("/languages"), - }, - { - id: "tags", - label: "Tags", - icon: , - current: pathname?.includes("/tags"), - }, - { - id: "api-keys", - label: "API Keys", - icon: , - current: pathname?.includes("/api-keys"), - }, - { - id: "website-connection", - label: "Website Connection", - icon: , - current: pathname?.includes("/website-connection"), - hidden: true, - }, - { - id: "app-connection", - label: "App Connection", - icon: , - current: pathname?.includes("/app-connection"), - hidden: true, + skeletonLines: [{ classes: "h-12 w-4/6 rounded-lg" }], }, ]; return ( -
- - -
- -
-
-
-
- {cards.map((card, index) => ( - - ))} -
-
+ + + + +
+ {cards.map((card, index) => ( + + ))} +
); }; diff --git a/apps/web/app/(app)/environments/[environmentId]/product/(setup)/app-connection/page.tsx b/apps/web/app/(app)/environments/[environmentId]/product/(setup)/app-connection/page.tsx index 78e23ccf2a..98623261e6 100644 --- a/apps/web/app/(app)/environments/[environmentId]/product/(setup)/app-connection/page.tsx +++ b/apps/web/app/(app)/environments/[environmentId]/product/(setup)/app-connection/page.tsx @@ -43,17 +43,17 @@ const Page = async ({ params }) => { description="Check if your app is successfully connected with Formbricks. Reload page to recheck."> {environment && } + + + - - - ); diff --git a/apps/web/app/(app)/environments/[environmentId]/product/api-keys/loading.tsx b/apps/web/app/(app)/environments/[environmentId]/product/api-keys/loading.tsx index 9f0799194b..91aa6f3f2e 100644 --- a/apps/web/app/(app)/environments/[environmentId]/product/api-keys/loading.tsx +++ b/apps/web/app/(app)/environments/[environmentId]/product/api-keys/loading.tsx @@ -1,8 +1,6 @@ "use client"; -import { BrushIcon, KeyIcon, LanguagesIcon, ListChecksIcon, TagIcon, UsersIcon } from "lucide-react"; -import { usePathname } from "next/navigation"; -import { cn } from "@formbricks/lib/cn"; +import { ProductConfigNavigation } from "@/app/(app)/environments/[environmentId]/product/components/ProductConfigNavigation"; import { PageContentWrapper } from "@formbricks/ui/components/PageContentWrapper"; import { PageHeader } from "@formbricks/ui/components/PageHeader"; @@ -26,7 +24,7 @@ const LoadingCard = () => {
-
+
Loading
@@ -37,85 +35,14 @@ const LoadingCard = () => { }; const Loading = () => { - const pathname = usePathname(); - - let navigation = [ - { - id: "general", - label: "General", - icon: , - current: pathname?.includes("/general"), - }, - { - id: "look", - label: "Look & Feel", - icon: , - current: pathname?.includes("/look"), - }, - { - id: "languages", - label: "Survey Languages", - icon: , - hidden: true, - current: pathname?.includes("/languages"), - }, - { - id: "tags", - label: "Tags", - icon: , - current: pathname?.includes("/tags"), - }, - { - id: "api-keys", - label: "API Keys", - icon: , - current: pathname?.includes("/api-keys"), - }, - { - id: "website-connection", - label: "Website Connection", - icon: , - current: pathname?.includes("/website-connection"), - hidden: true, - }, - { - id: "app-connection", - label: "App Connection", - icon: , - current: pathname?.includes("/app-connection"), - hidden: true, - }, - ]; - return ( -
- - -
- -
-
-
-
- - -
-
+ + + + +
+ +
); }; diff --git a/apps/web/app/(app)/environments/[environmentId]/product/components/ProductConfigNavigation.tsx b/apps/web/app/(app)/environments/[environmentId]/product/components/ProductConfigNavigation.tsx index 3086183502..9fa6d6ea04 100644 --- a/apps/web/app/(app)/environments/[environmentId]/product/components/ProductConfigNavigation.tsx +++ b/apps/web/app/(app)/environments/[environmentId]/product/components/ProductConfigNavigation.tsx @@ -5,15 +5,17 @@ import { usePathname } from "next/navigation"; import { SecondaryNavigation } from "@formbricks/ui/components/SecondaryNavigation"; interface ProductConfigNavigationProps { - environmentId: string; activeId: string; - isMultiLanguageAllowed: boolean; + environmentId?: string; + isMultiLanguageAllowed?: boolean; + loading?: boolean; } export const ProductConfigNavigation = ({ - environmentId, activeId, + environmentId, isMultiLanguageAllowed, + loading, }: ProductConfigNavigationProps) => { const pathname = usePathname(); let navigation = [ @@ -62,5 +64,5 @@ export const ProductConfigNavigation = ({ }, ]; - return ; + return ; }; diff --git a/apps/web/app/(app)/environments/[environmentId]/product/general/loading.tsx b/apps/web/app/(app)/environments/[environmentId]/product/general/loading.tsx index 003e74e32d..5fc318e862 100644 --- a/apps/web/app/(app)/environments/[environmentId]/product/general/loading.tsx +++ b/apps/web/app/(app)/environments/[environmentId]/product/general/loading.tsx @@ -1,34 +1,11 @@ "use client"; -import { BrushIcon, KeyIcon, LanguagesIcon, ListChecksIcon, TagIcon, UsersIcon } from "lucide-react"; -import { usePathname } from "next/navigation"; -import { cn } from "@formbricks/lib/cn"; +import { LoadingCard } from "@/app/(app)/components/LoadingCard"; +import { ProductConfigNavigation } from "@/app/(app)/environments/[environmentId]/product/components/ProductConfigNavigation"; import { PageContentWrapper } from "@formbricks/ui/components/PageContentWrapper"; import { PageHeader } from "@formbricks/ui/components/PageHeader"; -const LoadingCard = ({ title, description, skeletonLines }) => { - return ( -
-
-

{title}

-

{description}

-
-
-
- {skeletonLines.map((line, index) => ( -
-
-
- ))} -
-
-
- ); -}; - const Loading = () => { - const pathname = usePathname(); - const cards = [ { title: "Product Name", @@ -48,83 +25,15 @@ const Loading = () => { }, ]; - let navigation = [ - { - id: "general", - label: "General", - icon: , - current: pathname?.includes("/general"), - }, - { - id: "look", - label: "Look & Feel", - icon: , - current: pathname?.includes("/look"), - }, - { - id: "languages", - label: "Survey Languages", - icon: , - hidden: true, - current: pathname?.includes("/languages"), - }, - { - id: "tags", - label: "Tags", - icon: , - current: pathname?.includes("/tags"), - }, - { - id: "api-keys", - label: "API Keys", - icon: , - current: pathname?.includes("/api-keys"), - }, - { - id: "website-connection", - label: "Website Connection", - icon: , - current: pathname?.includes("/website-connection"), - hidden: true, - }, - { - id: "app-connection", - label: "App Connection", - icon: , - current: pathname?.includes("/app-connection"), - hidden: true, - }, - ]; - return ( -
- - -
- -
-
-
- {cards.map((card, index) => ( - - ))} -
-
+ + + + + {cards.map((card, index) => ( + + ))} + ); }; diff --git a/apps/web/app/(app)/environments/[environmentId]/product/languages/loading.tsx b/apps/web/app/(app)/environments/[environmentId]/product/languages/loading.tsx new file mode 100644 index 0000000000..f5e2b5dd26 --- /dev/null +++ b/apps/web/app/(app)/environments/[environmentId]/product/languages/loading.tsx @@ -0,0 +1,33 @@ +"use client"; + +import { ProductConfigNavigation } from "@/app/(app)/environments/[environmentId]/product/components/ProductConfigNavigation"; +import { SettingsCard } from "@/app/(app)/environments/[environmentId]/settings/components/SettingsCard"; +import { LanguageLabels } from "@formbricks/ee/multi-language/components/language-labels"; +import { PageContentWrapper } from "@formbricks/ui/components/PageContentWrapper"; +import { PageHeader } from "@formbricks/ui/components/PageHeader"; + +const Loading = () => { + return ( + + + + + +
+ + {[...Array(3)].map((_, idx) => ( +
+
+
+
+
+ ))} +
+ + + ); +}; + +export default Loading; diff --git a/apps/web/app/(app)/environments/[environmentId]/product/look/loading.tsx b/apps/web/app/(app)/environments/[environmentId]/product/look/loading.tsx index 7a65221abf..d00e3ae99d 100644 --- a/apps/web/app/(app)/environments/[environmentId]/product/look/loading.tsx +++ b/apps/web/app/(app)/environments/[environmentId]/product/look/loading.tsx @@ -1,8 +1,7 @@ "use client"; +import { ProductConfigNavigation } from "@/app/(app)/environments/[environmentId]/product/components/ProductConfigNavigation"; import { SettingsCard } from "@/app/(app)/environments/[environmentId]/settings/components/SettingsCard"; -import { BrushIcon, KeyIcon, LanguagesIcon, ListChecksIcon, TagIcon, UsersIcon } from "lucide-react"; -import { usePathname } from "next/navigation"; import { cn } from "@formbricks/lib/cn"; import { Badge } from "@formbricks/ui/components/Badge"; import { Button } from "@formbricks/ui/components/Button"; @@ -21,202 +20,140 @@ const placements = [ ]; const Loading = () => { - const pathname = usePathname(); - - let navigation = [ - { - id: "general", - label: "General", - icon: , - current: pathname?.includes("/general"), - }, - { - id: "look", - label: "Look & Feel", - icon: , - current: pathname?.includes("/look"), - }, - { - id: "languages", - label: "Survey Languages", - icon: , - hidden: true, - current: pathname?.includes("/languages"), - }, - { - id: "tags", - label: "Tags", - icon: , - current: pathname?.includes("/tags"), - }, - { - id: "api-keys", - label: "API Keys", - icon: , - current: pathname?.includes("/api-keys"), - }, - { - id: "website-connection", - label: "Website Connection", - icon: , - current: pathname?.includes("/website-connection"), - hidden: true, - }, - { - id: "app-connection", - label: "App Connection", - icon: , - current: pathname?.includes("/app-connection"), - hidden: true, - }, - ]; - return ( -
- - -
- -
-
-
- -
-
-
-
-
- -
-

Enable custom styling

-

- Allow users to override this theme in the editor. -

-
-
-
- -
-
-
-

Form Styling

-

- Style the question texts, descriptions and input fields. -

-
-
- -
-
-

Card Styling

-

Style the survey card.

-
-
- -
-
-
-

Background Styling

- -
-

- Change the background to a color, image or animation. -

-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
-

Preview

- -
Restart
-
-
- -
-

Loading preview...

-
-
-
+ +
+
- + +
+
- -
-
- - {placements.map((placement) => ( -
- - -
- ))} -
-
-
-
-
- + +
+
+ +
- - - -
-
- - -
-
-
- -
+
+
+
); }; diff --git a/apps/web/app/(app)/environments/[environmentId]/product/tags/loading.tsx b/apps/web/app/(app)/environments/[environmentId]/product/tags/loading.tsx new file mode 100644 index 0000000000..1520674746 --- /dev/null +++ b/apps/web/app/(app)/environments/[environmentId]/product/tags/loading.tsx @@ -0,0 +1,42 @@ +"use client"; + +import { ProductConfigNavigation } from "@/app/(app)/environments/[environmentId]/product/components/ProductConfigNavigation"; +import { SettingsCard } from "@/app/(app)/environments/[environmentId]/settings/components/SettingsCard"; +import { PageContentWrapper } from "@formbricks/ui/components/PageContentWrapper"; +import { PageHeader } from "@formbricks/ui/components/PageHeader"; + +const Loading = () => { + return ( + + + + + +
+
+
Tag
+
Count
+
Actions
+
+
+ {[...Array(3)].map((_, idx) => ( +
+
+ +
+
+
+
+
+
+
+
+ ))} +
+
+ + + ); +}; + +export default Loading; diff --git a/apps/web/app/(app)/environments/[environmentId]/settings/(account)/components/AccountSettingsNavbar.tsx b/apps/web/app/(app)/environments/[environmentId]/settings/(account)/components/AccountSettingsNavbar.tsx index 179a7b21b1..c1bd82b9bd 100644 --- a/apps/web/app/(app)/environments/[environmentId]/settings/(account)/components/AccountSettingsNavbar.tsx +++ b/apps/web/app/(app)/environments/[environmentId]/settings/(account)/components/AccountSettingsNavbar.tsx @@ -7,9 +7,11 @@ import { SecondaryNavigation } from "@formbricks/ui/components/SecondaryNavigati export const AccountSettingsNavbar = ({ environmentId, activeId, + loading, }: { - environmentId: string; activeId: string; + environmentId?: string; + loading?: boolean; }) => { const pathname = usePathname(); const navigation = [ @@ -29,5 +31,5 @@ export const AccountSettingsNavbar = ({ }, ]; - return ; + return ; }; diff --git a/apps/web/app/(app)/environments/[environmentId]/settings/(account)/notifications/loading.tsx b/apps/web/app/(app)/environments/[environmentId]/settings/(account)/notifications/loading.tsx index 878b53cff7..101a1fab3d 100644 --- a/apps/web/app/(app)/environments/[environmentId]/settings/(account)/notifications/loading.tsx +++ b/apps/web/app/(app)/environments/[environmentId]/settings/(account)/notifications/loading.tsx @@ -1,22 +1,7 @@ -const LoadingCard = ({ title, description, skeletonLines }) => { - return ( -
-
-

{title}

-

{description}

-
-
-
- {skeletonLines.map((line, index) => ( -
-
-
- ))} -
-
-
- ); -}; +import { LoadingCard } from "@/app/(app)/components/LoadingCard"; +import { AccountSettingsNavbar } from "@/app/(app)/environments/[environmentId]/settings/(account)/components/AccountSettingsNavbar"; +import { PageContentWrapper } from "@formbricks/ui/components/PageContentWrapper"; +import { PageHeader } from "@formbricks/ui/components/PageHeader"; const Loading = () => { const cards = [ @@ -32,33 +17,15 @@ const Loading = () => { }, ]; - const pages = ["Profile", "Notifications"]; - return ( -
-
-
-

Account Settings

-
-
-
-
- -
-
-
+ + + + {cards.map((card, index) => ( ))} -
+ ); }; diff --git a/apps/web/app/(app)/environments/[environmentId]/settings/(account)/profile/loading.tsx b/apps/web/app/(app)/environments/[environmentId]/settings/(account)/profile/loading.tsx index 17054b7d09..1e153b1f20 100644 --- a/apps/web/app/(app)/environments/[environmentId]/settings/(account)/profile/loading.tsx +++ b/apps/web/app/(app)/environments/[environmentId]/settings/(account)/profile/loading.tsx @@ -1,22 +1,7 @@ -const LoadingCard = ({ title, description, skeletonLines }) => { - return ( -
-
-

{title}

-

{description}

-
-
-
- {skeletonLines.map((line, index) => ( -
-
-
- ))} -
-
-
- ); -}; +import { LoadingCard } from "@/app/(app)/components/LoadingCard"; +import { AccountSettingsNavbar } from "@/app/(app)/environments/[environmentId]/settings/(account)/components/AccountSettingsNavbar"; +import { PageContentWrapper } from "@formbricks/ui/components/PageContentWrapper"; +import { PageHeader } from "@formbricks/ui/components/PageHeader"; const Loading = () => { const cards = [ @@ -47,33 +32,15 @@ const Loading = () => { }, ]; - const pages = ["Profile", "Notifications"]; - return ( -
-
-
-

Account Settings

-
-
-
-
- -
-
-
+ + + + {cards.map((card, index) => ( ))} -
+ ); }; diff --git a/apps/web/app/(app)/environments/[environmentId]/settings/(organization)/components/OrganizationSettingsNavbar.tsx b/apps/web/app/(app)/environments/[environmentId]/settings/(organization)/components/OrganizationSettingsNavbar.tsx index 4b6ebf4fa4..e97d997113 100644 --- a/apps/web/app/(app)/environments/[environmentId]/settings/(organization)/components/OrganizationSettingsNavbar.tsx +++ b/apps/web/app/(app)/environments/[environmentId]/settings/(organization)/components/OrganizationSettingsNavbar.tsx @@ -11,11 +11,13 @@ export const OrganizationSettingsNavbar = ({ isFormbricksCloud, membershipRole, activeId, + loading, }: { - environmentId: string; + environmentId?: string; isFormbricksCloud: boolean; membershipRole?: TMembershipRole; activeId: string; + loading?: boolean; }) => { const pathname = usePathname(); const { isAdmin, isOwner } = getAccessFlags(membershipRole); @@ -48,5 +50,5 @@ export const OrganizationSettingsNavbar = ({ }, ]; - return ; + return ; }; diff --git a/apps/web/app/(app)/environments/[environmentId]/settings/(organization)/enterprise/loading.tsx b/apps/web/app/(app)/environments/[environmentId]/settings/(organization)/enterprise/loading.tsx index 4b9428fbe8..718c42563f 100644 --- a/apps/web/app/(app)/environments/[environmentId]/settings/(organization)/enterprise/loading.tsx +++ b/apps/web/app/(app)/environments/[environmentId]/settings/(organization)/enterprise/loading.tsx @@ -1,30 +1,17 @@ -const pages = ["Members", "Enterprise License"]; +import { OrganizationSettingsNavbar } from "@/app/(app)/environments/[environmentId]/settings/(organization)/components/OrganizationSettingsNavbar"; +import { IS_FORMBRICKS_CLOUD } from "@formbricks/lib/constants"; +import { PageContentWrapper } from "@formbricks/ui/components/PageContentWrapper"; +import { PageHeader } from "@formbricks/ui/components/PageHeader"; const Loading = () => { return ( -
-
-
-

Organization Settings

-
-
-
-
- -
-
-
+ + + +
-
+ ); }; diff --git a/apps/web/app/(app)/environments/[environmentId]/settings/(organization)/members/loading.tsx b/apps/web/app/(app)/environments/[environmentId]/settings/(organization)/members/loading.tsx index 73321b8a37..fcdbbbfbe1 100644 --- a/apps/web/app/(app)/environments/[environmentId]/settings/(organization)/members/loading.tsx +++ b/apps/web/app/(app)/environments/[environmentId]/settings/(organization)/members/loading.tsx @@ -1,26 +1,8 @@ +import { LoadingCard } from "@/app/(app)/components/LoadingCard"; +import { OrganizationSettingsNavbar } from "@/app/(app)/environments/[environmentId]/settings/(organization)/components/OrganizationSettingsNavbar"; import { IS_FORMBRICKS_CLOUD } from "@formbricks/lib/constants"; - -const LoadingCard = ({ title, description, skeletonLines }) => { - return ( -
-
-

{title}

-

{description}

-
-
-
- {skeletonLines.map((line, index) => ( -
-
-
- ))} -
-
-
- ); -}; +import { PageContentWrapper } from "@formbricks/ui/components/PageContentWrapper"; +import { PageHeader } from "@formbricks/ui/components/PageHeader"; const cards = [ { @@ -41,34 +23,16 @@ const cards = [ }, ]; -const pages = ["Members", IS_FORMBRICKS_CLOUD ? "Billing & Plan" : "Enterprise License"]; - const Loading = () => { return ( -
-
-
-

Organization Settings

-
-
-
-
- -
-
-
+ + + + {cards.map((card, index) => ( ))} -
+ ); }; diff --git a/apps/web/app/(ee)/environments/[environmentId]/settings/(organization)/billing/loading.tsx b/apps/web/app/(ee)/environments/[environmentId]/settings/(organization)/billing/loading.tsx index f44b2f53e9..992e29614e 100644 --- a/apps/web/app/(ee)/environments/[environmentId]/settings/(organization)/billing/loading.tsx +++ b/apps/web/app/(ee)/environments/[environmentId]/settings/(organization)/billing/loading.tsx @@ -1,30 +1,17 @@ -const pages = ["Members", "Billing & Plan"]; +import { OrganizationSettingsNavbar } from "@/app/(app)/environments/[environmentId]/settings/(organization)/components/OrganizationSettingsNavbar"; +import { IS_FORMBRICKS_CLOUD } from "@formbricks/lib/constants"; +import { PageContentWrapper } from "@formbricks/ui/components/PageContentWrapper"; +import { PageHeader } from "@formbricks/ui/components/PageHeader"; const Loading = () => { return ( -
-
-
-

Organization Settings

-
-
-
-
- -
-
-
+ + + +
-
+ ); }; diff --git a/packages/ee/multi-language/components/edit-language.tsx b/packages/ee/multi-language/components/edit-language.tsx index 4713b76dda..a13e0d985e 100644 --- a/packages/ee/multi-language/components/edit-language.tsx +++ b/packages/ee/multi-language/components/edit-language.tsx @@ -1,6 +1,6 @@ "use client"; -import { InfoIcon, PlusIcon } from "lucide-react"; +import { PlusIcon } from "lucide-react"; import { useEffect, useState } from "react"; import { toast } from "react-hot-toast"; import { getFormattedErrorMessage } from "@formbricks/lib/actionClient/helper"; @@ -8,14 +8,13 @@ import { iso639Languages } from "@formbricks/lib/i18n/utils"; import type { TLanguage, TProduct } from "@formbricks/types/product"; import { Button } from "@formbricks/ui/components/Button"; import { ConfirmationModal } from "@formbricks/ui/components/ConfirmationModal"; -import { Label } from "@formbricks/ui/components/Label"; -import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@formbricks/ui/components/Tooltip"; import { createLanguageAction, deleteLanguageAction, getSurveysUsingGivenLanguageAction, updateLanguageAction, } from "../lib/actions"; +import { LanguageLabels } from "./language-labels"; import { LanguageRow } from "./language-row"; interface EditLanguageProps { @@ -214,35 +213,6 @@ export function EditLanguage({ product }: EditLanguageProps) { ); } -function AliasTooltip() { - return ( - - - -
- -
-
- - The alias is an alternate name to identify the language in link surveys and the SDK (optional) - -
-
- ); -} - -function LanguageLabels() { - return ( -
- - - -
- ); -} - const EditSaveButtons: React.FC<{ isEditing: boolean; onSave: () => void; diff --git a/packages/ee/multi-language/components/language-labels.tsx b/packages/ee/multi-language/components/language-labels.tsx new file mode 100644 index 0000000000..17a3b6c7d0 --- /dev/null +++ b/packages/ee/multi-language/components/language-labels.tsx @@ -0,0 +1,32 @@ +import { InfoIcon } from "lucide-react"; +import { Label } from "@formbricks/ui/components/Label"; +import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@formbricks/ui/components/Tooltip"; + +export function LanguageLabels() { + return ( +
+ + + +
+ ); +} + +function AliasTooltip() { + return ( + + + +
+ +
+
+ + The alias is an alternate name to identify the language in link surveys and the SDK (optional) + +
+
+ ); +}