From 081a2d8f699bb76a4e8cdf791f9cb57f50c1be38 Mon Sep 17 00:00:00 2001
From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com>
Date: Thu, 28 Nov 2024 20:56:35 -0600
Subject: [PATCH] fix: prevent to load stripe code when is not cloud
---
.../dokploy/components/icons/data-tools-icons.tsx | 4 ++--
apps/dokploy/pages/dashboard/projects.tsx | 15 +++++++++++++--
2 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/apps/dokploy/components/icons/data-tools-icons.tsx b/apps/dokploy/components/icons/data-tools-icons.tsx
index 116f5d8a..93da14a0 100644
--- a/apps/dokploy/components/icons/data-tools-icons.tsx
+++ b/apps/dokploy/components/icons/data-tools-icons.tsx
@@ -231,8 +231,8 @@ export const BitbucketIcon = ({ className }: Props) => {
y2="10.814"
gradientUnits="userSpaceOnUse"
>
-
-
+
+
diff --git a/apps/dokploy/pages/dashboard/projects.tsx b/apps/dokploy/pages/dashboard/projects.tsx
index 283a7c6e..d6047935 100644
--- a/apps/dokploy/pages/dashboard/projects.tsx
+++ b/apps/dokploy/pages/dashboard/projects.tsx
@@ -1,18 +1,29 @@
import { ShowProjects } from "@/components/dashboard/projects/show";
-import { ShowWelcomeDokploy } from "@/components/dashboard/settings/billing/show-welcome-dokploy";
import { DashboardLayout } from "@/components/layouts/dashboard-layout";
import { appRouter } from "@/server/api/root";
+import { api } from "@/utils/api";
import { validateRequest } from "@dokploy/server";
import { createServerSideHelpers } from "@trpc/react-query/server";
import type { GetServerSidePropsContext } from "next";
+import dynamic from "next/dynamic";
import type React from "react";
import type { ReactElement } from "react";
import superjson from "superjson";
+const ShowWelcomeDokploy = dynamic(
+ () =>
+ import("@/components/dashboard/settings/billing/show-welcome-dokploy").then(
+ (mod) => mod.ShowWelcomeDokploy,
+ ),
+ { ssr: false },
+);
+
const Dashboard = () => {
+ const { data: isCloud } = api.settings.isCloud.useQuery();
return (
<>
-
+ {isCloud && }
+
>
);