diff --git a/packages/app/src/app/pages/Dashboard/Content/routes/Recent/Banners/SDKWorkspaceBanner.tsx b/packages/app/src/app/pages/Dashboard/Content/routes/Recent/Banners/SDKWorkspaceBanner.tsx new file mode 100644 index 00000000000..ba89d25d8d5 --- /dev/null +++ b/packages/app/src/app/pages/Dashboard/Content/routes/Recent/Banners/SDKWorkspaceBanner.tsx @@ -0,0 +1,33 @@ +import React from 'react'; +import { Banner, Link, Stack, Text } from '@codesandbox/components'; +import track from '@codesandbox/common/lib/utils/analytics'; +import { BannerProps } from './types'; + +export const SDKWorkspaceBanner: React.FC = ({ onDismiss }) => { + return ( + { + track('SDK Workspace Banner - Dismiss'); + onDismiss(); + }} + > + + + Welcome to the CodeSandbox dashboard + + + + We are in the process of creating a dashboard that is curated + specifically for your SDK usage. Check out the{' '} + usage page for information related to + your subscription and usage. Check out the{' '} + + CLI docs + {' '} + on how to view and inspect sandboxes created via the SDK. + + + + + ); +}; diff --git a/packages/app/src/app/pages/Dashboard/Content/routes/Recent/TopBanner.tsx b/packages/app/src/app/pages/Dashboard/Content/routes/Recent/TopBanner.tsx index dd15d0cb12d..62d71dfc2d9 100644 --- a/packages/app/src/app/pages/Dashboard/Content/routes/Recent/TopBanner.tsx +++ b/packages/app/src/app/pages/Dashboard/Content/routes/Recent/TopBanner.tsx @@ -7,6 +7,7 @@ import { useAppState } from 'app/overmind'; import { FreeUpgradeBanner } from './Banners/FreeUpgradeBanner'; import { UBBWelcomeBanner } from './Banners/UBBWelcomeBanner'; import { LegacyProConvertBanner } from './Banners/LegacyProConvertBanner'; +import { SDKWorkspaceBanner } from './Banners/SDKWorkspaceBanner'; export const TopBanner = () => { const { ubbBeta } = useWorkspaceFeatureFlags(); @@ -17,6 +18,11 @@ export const TopBanner = () => { activeTeamInfo?.insertedAt && new Date(activeTeamInfo.insertedAt) < new Date('2024-02-01'); + const [ + sdkWorkspaceBannerDismissed, + dismissSDKWorkspaceBanner, + ] = useDismissible(`${activeTeam}_SDK_WORKSPACE_BANNER`); + const [welcomeBannerDismissed, dismissWelcomeBanner] = useDismissible( `${activeTeam}_UBB_WELCOME` ); @@ -29,6 +35,13 @@ export const TopBanner = () => { `${activeTeam}_UPSELL_PRO_BANNER` ); + // TODO + const isSDKWorkspace = true; + + if (isSDKWorkspace && !sdkWorkspaceBannerDismissed) { + return ; + } + if (!ubbBeta) { // Legacy case for seat-based Pro accounts if (isPro && !legacyProBannerDismissed) {