@@ -2,14 +2,16 @@ import React from "react";
22import Link from "next/link" ;
33import { useParams } from "next/navigation" ;
44import { Briefcase , Hotel , Users } from "lucide-react" ;
5+ // plane ui
6+ import { Avatar } from "@plane/ui" ;
57// helpers
68import { getFileURL } from "@/helpers/file.helper" ;
79// hooks
810import { useCommandPalette , useEventTracker , useUser , useUserPermissions } from "@/hooks/store" ;
911// plane web constants
1012import { EUserPermissions , EUserPermissionsLevel } from "@/plane-web/constants" ;
1113
12- export const EmptyWorkspace = ( ) => {
14+ export const NoProjectsEmptyState = ( ) => {
1315 // navigation
1416 const { workspaceSlug } = useParams ( ) ;
1517 // store hooks
@@ -26,11 +28,11 @@ export const EmptyWorkspace = () => {
2628 const EMPTY_STATE_DATA = [
2729 {
2830 id : "create-project" ,
29- title : "Create a project" ,
30- description : "Create your first project now to get started " ,
31- icon : < Briefcase className = "w-[40px] h-[40px] text-custom-primary-100" /> ,
31+ title : "Create a project. " ,
32+ description : "Most things start with a project in Plane. " ,
33+ icon : < Briefcase className = "size-12 text-custom-primary-100" /> ,
3234 cta : {
33- text : "Create Project " ,
35+ text : "Get started " ,
3436 onClick : ( e : React . MouseEvent < HTMLButtonElement , MouseEvent > ) => {
3537 if ( ! canCreateProject ) return ;
3638 e . preventDefault ( ) ;
@@ -42,66 +44,56 @@ export const EmptyWorkspace = () => {
4244 } ,
4345 {
4446 id : "invite-team" ,
45- title : "Invite your team" ,
46- description : "The sub text will be of two lines and that will be placed ." ,
47- icon : < Users className = "w-[40px] h-[40px] text-custom-primary-100" /> ,
47+ title : "Invite your team. " ,
48+ description : "Build, ship, and manage with coworkers ." ,
49+ icon : < Users className = "size-12 text-custom-primary-100" /> ,
4850 cta : {
49- text : "Invite now " ,
51+ text : "Get them in " ,
5052 link : `/${ workspaceSlug } /settings/members` ,
5153 } ,
5254 } ,
5355 {
5456 id : "configure-workspace" ,
55- title : "Configure your workspace" ,
56- description : "The sub text will be of two lines and that will be placed ." ,
57- icon : < Hotel className = "w-[40px] h-[40px] text-custom-primary-100" /> ,
57+ title : "Set up your workspace. " ,
58+ description : "Turn features on or off or go beyond that." ,
59+ icon : < Hotel className = "size-12 text-custom-primary-100" /> ,
5860 cta : {
59- text : "Configure workspace" ,
61+ text : "Configure this workspace" ,
6062 link : "settings" ,
6163 } ,
6264 } ,
6365 {
6466 id : "personalize-account" ,
65- title : "Personalize your account" ,
66- description : "The sub text will be of two lines and that will be placed." ,
67- icon :
68- currentUser ?. avatar_url && currentUser ?. avatar_url . trim ( ) !== "" ? (
69- < Link href = { `/${ workspaceSlug } /profile/${ currentUser ?. id } ` } >
70- < span className = "relative flex h-6 w-6 items-center justify-center rounded-full p-4 capitalize text-white" >
71- < img
72- src = { getFileURL ( currentUser ?. avatar_url ) }
73- className = "absolute left-0 top-0 h-full w-full rounded-full object-cover"
74- alt = { currentUser ?. display_name || currentUser ?. email }
75- />
76- </ span >
77- </ Link >
78- ) : (
79- < Link href = { `/${ workspaceSlug } /profile/${ currentUser ?. id } ` } >
80- < span className = "relative flex h-6 w-6 items-center justify-center rounded-full bg-gray-700 p-4 capitalize text-white text-sm" >
81- { ( currentUser ?. email ?? currentUser ?. display_name ?? "?" ) [ 0 ] }
82- </ span >
83- </ Link >
84- ) ,
67+ title : "Make Plane yours." ,
68+ description : "Choose your picture, colors, and more." ,
69+ icon : (
70+ < Avatar
71+ src = { getFileURL ( currentUser ?. avatar_url ?? "" ) }
72+ name = { currentUser ?. display_name }
73+ size = { 48 }
74+ className = "text-xl"
75+ showTooltip = { false }
76+ />
77+ ) ,
8578 cta : {
86- text : "Personalize account " ,
79+ text : "Personalize now " ,
8780 link : "/profile" ,
8881 } ,
8982 } ,
9083 ] ;
9184
9285 return (
93- < div className = "grid grid-cols-1 md:grid-cols-2 lg :grid-cols-4 gap-4" >
86+ < div className = "grid grid-cols-1 md:grid-cols-2 xl :grid-cols-4 gap-4" >
9487 { EMPTY_STATE_DATA . map ( ( item ) => (
9588 < div
9689 key = { item . id }
97- className = "flex flex-col items-center justify-center py-8 bg-custom-background-100 rounded-lg text-center border border-custom-border-200/40"
90+ className = "flex flex-col items-center justify-center p-6 bg-custom-background-100 rounded-lg text-center border border-custom-border-200/40"
9891 >
99- < div className = "flex items-center justify-center bg-custom-primary-100/10 rounded-full w-[80px] h-[80px] mb-4 " >
92+ < div className = "grid place- items-center bg-custom-primary-100/10 rounded-full size-24 mb-3 " >
10093 < span className = "text-3xl my-auto" > { item . icon } </ span >
10194 </ div >
102- < h3 className = "text-lg font-medium text-custom-text-100 mb-2" > { item . title } </ h3 >
103- < p className = "text-sm text-custom-text-200 mb-4 w-[80%] flex-1" > { item . description } </ p >
104-
95+ < h3 className = "text-base font-medium text-custom-text-100 mb-2" > { item . title } </ h3 >
96+ < p className = "text-sm text-custom-text-300 mb-2" > { item . description } </ p >
10597 { item . cta . link ? (
10698 < Link
10799 href = { item . cta . link }
@@ -111,6 +103,7 @@ export const EmptyWorkspace = () => {
111103 </ Link >
112104 ) : (
113105 < button
106+ type = "button"
114107 className = "text-custom-primary-100 hover:text-custom-primary-200 text-sm font-medium"
115108 onClick = { item . cta . onClick }
116109 >
0 commit comments