Skip to content

Commit 31b60cc

Browse files
committed
[TOOL-4827] Move Nebula out of dashboard
1 parent 2b5941f commit 31b60cc

File tree

214 files changed

+8324
-1166
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

214 files changed

+8324
-1166
lines changed

apps/dashboard/.env.example

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,6 @@ NEXT_PUBLIC_STRIPE_KEY=
4444

4545
NEXT_PUBLIC_STRIPE_PAYMENT_METHOD_CFG_ID=
4646

47-
# Needed for contract analytics / blockchain data information
48-
CHAINSAW_API_KEY=
49-
5047
#
5148
# Private (server)
5249
#
@@ -65,17 +62,11 @@ MORALIS_API_KEY=
6562
# - not required to build (unless testing wallet NFTs)>
6663
SSR_ALCHEMY_KEY=
6764

68-
# beehiiv.com API key (used for newsletter signups)
69-
# - not required to build (unless testing newsletter signups)>
70-
BEEHIIV_API_KEY=
7165

7266
# Hubspot Access Token (used for contact us form)
7367
# - not required to build (unless testing contact us form)>
7468
HUBSPOT_ACCESS_TOKEN=
7569

76-
# Github API Token (used for /open-source)
77-
GITHUB_API_TOKEN="ghp_..."
78-
7970
# Upload server url
8071
NEXT_PUBLIC_DASHBOARD_UPLOAD_SERVER="https://storage.thirdweb-preview.com"
8172

@@ -100,8 +91,6 @@ REDIS_URL=""
10091

10192
ANALYTICS_SERVICE_URL=""
10293

103-
# Required for Nebula Chat
104-
NEXT_PUBLIC_NEBULA_URL=""
10594

10695
# required for billing parts of the dashboard (team -> settings -> billing / invoices)
10796
STRIPE_SECRET_KEY=""

apps/dashboard/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@
6262
"compare-versions": "^6.1.0",
6363
"date-fns": "4.1.0",
6464
"fast-xml-parser": "^5.2.5",
65-
"fetch-event-stream": "0.1.5",
6665
"flat": "^6.0.1",
6766
"framer-motion": "12.17.0",
6867
"fuse.js": "7.1.0",

apps/dashboard/src/@/components/Responsive.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"use client";
2+
import { ClientOnly } from "@/components/blocks/client-only";
23
import { Suspense } from "react";
3-
import { ClientOnly } from "../../components/ClientOnly/ClientOnly";
44
import { useIsMobile } from "../hooks/use-mobile";
55

66
export function ResponsiveLayout(props: {
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
"use client";
2+
3+
import { cn } from "@/lib/utils";
4+
import { type ReactNode, useEffect, useState } from "react";
5+
6+
interface ClientOnlyProps {
7+
/**
8+
* Use this to server render a skeleton or loading state
9+
*/
10+
ssr: ReactNode;
11+
className?: string;
12+
children: ReactNode;
13+
}
14+
15+
export const ClientOnly: React.FC<ClientOnlyProps> = ({
16+
children,
17+
ssr,
18+
className,
19+
}) => {
20+
const hasMounted = useIsClientMounted();
21+
22+
if (!hasMounted) {
23+
return <> {ssr} </>;
24+
}
25+
26+
return (
27+
<div className={cn("fade-in-0 fill-mode-forwards ease-in", className)}>
28+
{children}
29+
</div>
30+
);
31+
};
32+
33+
function useIsClientMounted() {
34+
const [hasMounted, setHasMounted] = useState(false);
35+
36+
// eslint-disable-next-line no-restricted-syntax
37+
useEffect(() => {
38+
setHasMounted(true);
39+
}, []);
40+
41+
return hasMounted;
42+
}

apps/dashboard/src/@/components/color-mode-toggle.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"use client";
22

3+
import { ClientOnly } from "@/components/blocks/client-only";
34
import { Button } from "@/components/ui/button";
4-
import { ClientOnly } from "components/ClientOnly/ClientOnly";
55
import { MoonIcon, SunIcon } from "lucide-react";
66
import { useTheme } from "next-themes";
77
import { Skeleton } from "./ui/skeleton";

apps/dashboard/src/@/components/ui/Spinner/Spinner.module.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
inset: 0px;
1313
border-radius: 50%;
1414
border: 4px solid #fff;
15-
animation: prixClipFix 2s linear infinite;
1615
stroke-linecap: round;
1716
animation: dash 1.5s ease-in-out infinite;
1817
}

apps/dashboard/src/@/components/ui/button.tsx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,16 @@ const buttonVariants = cva(
99
{
1010
variants: {
1111
variant: {
12-
primary:
13-
"bg-primary hover:bg-primary/90 text-semibold text-primary-foreground ",
12+
primary: "bg-primary hover:bg-primary/90 text-primary-foreground ",
1413
default: "bg-foreground text-background hover:bg-foreground/90",
1514
destructive:
16-
"bg-destructive hover:bg-destructive/90 text-semibold text-destructive-foreground ",
15+
"bg-destructive hover:bg-destructive/90 text-destructive-foreground ",
1716
outline:
18-
"border border-input bg-transparent hover:bg-accent hover:text-accent-foreground text-semibold",
17+
"border border-input bg-transparent hover:bg-accent hover:text-accent-foreground",
1918
secondary:
20-
"bg-secondary hover:bg-secondary/80 text-semibold text-secondary-foreground ",
21-
ghost: "hover:bg-accent text-semibold hover:text-accent-foreground",
22-
link: "text-primary underline-offset-4 hover:underline text-semibold",
19+
"bg-secondary hover:bg-secondary/80 text-secondary-foreground ",
20+
ghost: "hover:bg-accent hover:text-accent-foreground",
21+
link: "underline-offset-4 hover:underline",
2322
pink: "border border-nebula-pink-foreground !text-nebula-pink-foreground bg-[hsl(var(--nebula-pink-foreground)/5%)] hover:bg-nebula-pink-foreground/10 dark:!text-foreground dark:bg-nebula-pink-foreground/10 dark:hover:bg-nebula-pink-foreground/20",
2423
upsell:
2524
"bg-green-600 text-white hover:bg-green-700 shadow-lg hover:shadow-xl transform hover:-translate-y-0.5 transition-all duration-200",

apps/dashboard/src/@/components/ui/skeleton.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ function SkeletonContainer<T>(props: {
1616
loadedData?: T;
1717
skeletonData: T;
1818
className?: string;
19-
render: (data: T, isSkeleton: boolean) => React.ReactNode;
19+
render: (data: T) => React.ReactNode;
2020
style?: React.CSSProperties;
2121
}) {
2222
const isLoading = props.loadedData === undefined;
@@ -40,7 +40,6 @@ function SkeletonContainer<T>(props: {
4040
props.loadedData === undefined
4141
? props.skeletonData
4242
: props.loadedData,
43-
!isLoading,
4443
)}
4544
</div>
4645
</div>

apps/dashboard/src/@/constants/public-envs.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
export const NEXT_PUBLIC_DASHBOARD_CLIENT_ID =
22
process.env.NEXT_PUBLIC_DASHBOARD_CLIENT_ID || "";
33

4-
export const NEXT_PUBLIC_NEBULA_APP_CLIENT_ID =
5-
process.env.NEXT_PUBLIC_NEBULA_APP_CLIENT_ID || "";
6-
74
export const NEXT_PUBLIC_THIRDWEB_VAULT_URL =
85
process.env.NEXT_PUBLIC_THIRDWEB_VAULT_URL || "";
96

@@ -30,7 +27,5 @@ export const NEXT_PUBLIC_TURNSTILE_SITE_KEY =
3027
export const NEXT_PUBLIC_THIRDWEB_ENGINE_FAUCET_WALLET =
3128
process.env.NEXT_PUBLIC_THIRDWEB_ENGINE_FAUCET_WALLET || "";
3229

33-
export const NEXT_PUBLIC_NEBULA_URL = process.env.NEXT_PUBLIC_NEBULA_URL || "";
34-
3530
export const NEXT_PUBLIC_DEMO_ENGINE_URL =
3631
process.env.NEXT_PUBLIC_DEMO_ENGINE_URL || "";

apps/dashboard/src/@/constants/server-envs.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,6 @@ experimental_taintUniqueValue(
1818
DASHBOARD_THIRDWEB_SECRET_KEY,
1919
);
2020

21-
export const NEBULA_APP_SECRET_KEY = process.env.NEBULA_APP_SECRET_KEY || "";
22-
23-
if (NEBULA_APP_SECRET_KEY) {
24-
experimental_taintUniqueValue(
25-
"Do not pass NEBULA_APP_SECRET_KEY to the client",
26-
process,
27-
NEBULA_APP_SECRET_KEY,
28-
);
29-
}
30-
3121
export const API_SERVER_SECRET = process.env.API_SERVER_SECRET || "";
3222

3323
if (API_SERVER_SECRET) {

0 commit comments

Comments
 (0)