@@ -17,7 +17,7 @@ import {
1717 Grid ,
1818 IconButton ,
1919} from "@webstudio-is/design-system" ;
20- import { BodyIcon , ExtensionIcon } from "@webstudio-is/icons" ;
20+ import { BodyIcon } from "@webstudio-is/icons" ;
2121import {
2222 NavLink ,
2323 useLocation ,
@@ -33,10 +33,9 @@ import { dashboardPath } from "~/shared/router-utils";
3333import { CollapsibleSection } from "~/builder/shared/collapsible-section" ;
3434import { ProfileMenu } from "./profile-menu" ;
3535import { Projects } from "./projects/projects" ;
36- import { Templates } from "./templates/templates" ;
3736import { Welcome } from "./welcome/welcome" ;
3837import { Header } from "./shared/layout" ;
39- import { help } from "~/shared/help" ;
38+ import { help , socialLinks } from "~/shared/help" ;
4039import { SearchResults } from "./search/search-results" ;
4140import type { DashboardData } from "./shared/types" ;
4241import { Search } from "./search/search-field" ;
@@ -194,22 +193,16 @@ export const DashboardSetup = ({ data }: { data: DashboardData }) => {
194193const getView = (
195194 pathname : string ,
196195 hasProjects : boolean ,
197- isDefaultWorkspace : boolean
196+ isWorkspaceSuspended : boolean
198197) => {
199198 if ( pathname === dashboardPath ( "search" ) ) {
200199 return "search" ;
201200 }
202201
203- // Only show the onboarding welcome page on the default workspace
204- // when the user has no projects yet. Non-default workspaces that are
205- // empty should show the normal (empty) projects view.
206- if ( hasProjects === false && isDefaultWorkspace ) {
202+ if ( hasProjects === false && isWorkspaceSuspended === false ) {
207203 return "welcome" ;
208204 }
209205
210- if ( pathname === dashboardPath ( "templates" ) ) {
211- return "templates" ;
212- }
213206 return "projects" ;
214207} ;
215208
@@ -229,7 +222,6 @@ export const Dashboard = () => {
229222 publisherHost,
230223 projectToClone,
231224 projects,
232- templates,
233225 workspaces,
234226 currentWorkspaceId,
235227 } = data ;
@@ -243,38 +235,21 @@ export const Dashboard = () => {
243235 }
244236
245237 const isWorkspaceSuspended = isDowngradedForMember ( currentWorkspace ) ;
246- const hasProjects = projects . length > 0 || isWorkspaceSuspended ;
247- const isDefaultWorkspace =
248- currentWorkspaceId === undefined ||
249- workspaces ?. find ( ( w ) => w . id === currentWorkspaceId ) ?. isDefault === true ;
250- const view = getView ( location . pathname , hasProjects , isDefaultWorkspace ) ;
238+ const hasProjects = projects . length > 0 ;
239+ const view = getView ( location . pathname , hasProjects , isWorkspaceSuspended ) ;
251240
252241 const showWorkspaceSelector =
253242 workspaces !== undefined &&
254243 workspaces . length > 0 &&
255244 currentWorkspaceId !== undefined ;
256245
257- const navItems =
258- view === "welcome"
259- ? [
260- {
261- to : dashboardPath ( ) ,
262- prefix : < ExtensionIcon /> ,
263- children : "Welcome" ,
264- } ,
265- ]
266- : [
267- {
268- to : dashboardPath ( "projects" ) ,
269- prefix : < BodyIcon /> ,
270- children : "Projects" ,
271- } ,
272- {
273- to : dashboardPath ( "templates" ) ,
274- prefix : < ExtensionIcon /> ,
275- children : "Starter templates" ,
276- } ,
277- ] ;
246+ const navItems = [
247+ {
248+ to : dashboardPath ( "projects" ) ,
249+ prefix : < BodyIcon /> ,
250+ children : "Projects" ,
251+ } ,
252+ ] ;
278253
279254 return (
280255 < TooltipProvider >
@@ -360,6 +335,29 @@ export const Dashboard = () => {
360335 children : item . label ,
361336 } ) ) }
362337 />
338+ < Flex
339+ align = "center"
340+ gap = "3"
341+ css = { {
342+ paddingInline : theme . panel . paddingInline ,
343+ paddingBlock : theme . spacing [ 5 ] ,
344+ } }
345+ >
346+ < Text variant = "labels" color = "subtle" >
347+ Follow us:
348+ </ Text >
349+ { socialLinks . map ( ( { label, url, icon } ) => (
350+ < Link
351+ key = { url }
352+ href = { url }
353+ target = "_blank"
354+ color = "subtle"
355+ aria-label = { label }
356+ >
357+ { icon }
358+ </ Link >
359+ ) ) }
360+ </ Flex >
363361 </ CollapsibleSection >
364362 </ Grid >
365363 { view === "projects" && (
@@ -372,17 +370,8 @@ export const Dashboard = () => {
372370 isWorkspaceSuspended = { isWorkspaceSuspended }
373371 />
374372 ) }
375- { view === "templates" && (
376- < Templates
377- projects = { templates }
378- currentWorkspaceId = { currentWorkspaceId }
379- />
380- ) }
381373 { view === "welcome" && (
382- < Welcome
383- projects = { templates }
384- currentWorkspaceId = { currentWorkspaceId }
385- />
374+ < Welcome currentWorkspaceId = { currentWorkspaceId } />
386375 ) }
387376 { view === "search" && < SearchResults { ...data } /> }
388377 </ Flex >
0 commit comments