diff options
author | 2019-04-15 13:23:56 +0200 | |
---|---|---|
committer | 2019-04-15 13:23:56 +0200 | |
commit | 86536bb1d158434e837aa5f7edfeda95e3e4ac8c (patch) | |
tree | 2dc110e1ff6e60015e8ccff6193c23850cf62fa3 /src/features | |
parent | Merge branch 'feature/announcements' into develop (diff) | |
download | ferdium-app-86536bb1d158434e837aa5f7edfeda95e3e4ac8c.tar.gz ferdium-app-86536bb1d158434e837aa5f7edfeda95e3e4ac8c.tar.zst ferdium-app-86536bb1d158434e837aa5f7edfeda95e3e4ac8c.zip |
Add workspace empty state
Diffstat (limited to 'src/features')
-rw-r--r-- | src/features/workspaces/components/WorkspacesDashboard.js | 38 |
1 files changed, 26 insertions, 12 deletions
diff --git a/src/features/workspaces/components/WorkspacesDashboard.js b/src/features/workspaces/components/WorkspacesDashboard.js index dd4381a15..09c98ab8c 100644 --- a/src/features/workspaces/components/WorkspacesDashboard.js +++ b/src/features/workspaces/components/WorkspacesDashboard.js | |||
@@ -170,18 +170,32 @@ class WorkspacesDashboard extends Component { | |||
170 | {intl.formatMessage(messages.workspacesRequestFailed)} | 170 | {intl.formatMessage(messages.workspacesRequestFailed)} |
171 | </Infobox> | 171 | </Infobox> |
172 | ) : ( | 172 | ) : ( |
173 | <table className={classes.table}> | 173 | <Fragment> |
174 | {/* ===== Workspaces list ===== */} | 174 | {workspaces.length === 0 ? ( |
175 | <tbody> | 175 | <div className="align-middle settings__empty-state"> |
176 | {workspaces.map(workspace => ( | 176 | {/* ===== Workspaces empty state ===== */} |
177 | <WorkspaceItem | 177 | <p className="settings__empty-text"> |
178 | key={workspace.id} | 178 | <span className="emoji"> |
179 | workspace={workspace} | 179 | <img src="./assets/images/emoji/sad.png" alt="" /> |
180 | onItemClick={w => onWorkspaceClick(w)} | 180 | </span> |
181 | /> | 181 | {intl.formatMessage(messages.noServicesAdded)} |
182 | ))} | 182 | </p> |
183 | </tbody> | 183 | </div> |
184 | </table> | 184 | ) : ( |
185 | <table className={classes.table}> | ||
186 | {/* ===== Workspaces list ===== */} | ||
187 | <tbody> | ||
188 | {workspaces.map(workspace => ( | ||
189 | <WorkspaceItem | ||
190 | key={workspace.id} | ||
191 | workspace={workspace} | ||
192 | onItemClick={w => onWorkspaceClick(w)} | ||
193 | /> | ||
194 | ))} | ||
195 | </tbody> | ||
196 | </table> | ||
197 | )} | ||
198 | </Fragment> | ||
185 | )} | 199 | )} |
186 | </Fragment> | 200 | </Fragment> |
187 | )} | 201 | )} |