@@ -14,6 +14,7 @@ import { FullScreenLoader } from "../../components/Loader/FullScreenLoader"
14
14
15
15
import { Organization , Project } from "./../../api"
16
16
import useSWR from "swr"
17
+ import { CodeBlock } from "../../components/CodeBlock"
17
18
18
19
const ProjectsPage : React . FC = ( ) => {
19
20
const styles = useStyles ( )
@@ -38,11 +39,6 @@ const ProjectsPage: React.FC = () => {
38
39
void router . push ( "/projects/create" )
39
40
}
40
41
41
- const action = {
42
- text : "Create Project" ,
43
- onClick : createProject ,
44
- }
45
-
46
42
// Create a dictionary of organization ID -> organization Name
47
43
// Needed to properly construct links to dive into a project
48
44
const orgDictionary = orgs . reduce ( ( acc : Record < string , string > , curr : Organization ) => {
@@ -62,16 +58,14 @@ const ProjectsPage: React.FC = () => {
62
58
} ,
63
59
]
64
60
65
- const emptyState = (
66
- < EmptyState
67
- button = { {
68
- children : "Create Project" ,
69
- onClick : createProject ,
70
- } }
71
- message = "No projects have been created yet"
72
- description = "Create a project to get started."
73
- />
74
- )
61
+ const description = < div >
62
+ < div > Run the following command to get started:</ div >
63
+ < CodeBlock lines = { [ "coder project create" ] } />
64
+ </ div >
65
+
66
+ const emptyState = < EmptyState
67
+ message = "No projects have been created yet"
68
+ description = { description } />
75
69
76
70
const tableProps = {
77
71
title : "All Projects" ,
@@ -85,7 +79,7 @@ const ProjectsPage: React.FC = () => {
85
79
return (
86
80
< div className = { styles . root } >
87
81
< Navbar user = { me } onSignOut = { signOut } />
88
- < Header title = "Projects" subTitle = { subTitle } action = { action } />
82
+ < Header title = "Projects" subTitle = { subTitle } />
89
83
< Paper style = { { maxWidth : "1380px" , margin : "1em auto" , width : "100%" } } >
90
84
< Table { ...tableProps } />
91
85
</ Paper >
0 commit comments