fix: prevent to load stripe code when is not cloud

This commit is contained in:
Mauricio Siu
2024-11-28 20:56:35 -06:00
parent a6368ee0b8
commit 081a2d8f69
2 changed files with 15 additions and 4 deletions

View File

@@ -231,8 +231,8 @@ export const BitbucketIcon = ({ className }: Props) => {
y2="10.814"
gradientUnits="userSpaceOnUse"
>
<stop offset=".18" stop-color="#0052CC" />
<stop offset="1" stop-color="#2684FF" />
<stop offset=".18" stopColor="#0052CC" />
<stop offset="1" stopColor="#2684FF" />
</linearGradient>
</defs>
</svg>

View File

@@ -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 (
<>
<ShowWelcomeDokploy />
{isCloud && <ShowWelcomeDokploy />}
<ShowProjects />
</>
);