Skip to content

feat: Improve empty states for workspaces and templates #1950

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Jun 1, 2022
Merged
Prev Previous commit
Next Next commit
Update message if user has no permission to create template
  • Loading branch information
BrunoQuaresma committed Jun 1, 2022
commit dfef3390e094ab9e94e3c4a02e28f22939ba3f8f
13 changes: 1 addition & 12 deletions site/src/pages/TemplatesPage/TemplatesPageView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,21 +66,10 @@ export const TemplatesPageView: FC<TemplatesPageViewProps> = (props) => {
<TableCell colSpan={999}>
<EmptyState
message={Language.emptyMessage}
description={Language.emptyDescription}
description={props.canCreateTemplate ? Language.emptyDescription : Language.emptyViewNoPerms}
descriptionClassName={styles.emptyDescription}
cta={<CodeExample code="coder template init" />}
/>

{/* {props.canCreateTemplate ? (
<span>
<Link component={RouterLink} to="/templates/new">
{Language.emptyViewCreateCTA}
</Link>
&nbsp;{Language.emptyViewCreate}
</span>
) : (
<span>{Language.emptyViewNoPerms}</span>
)} */}
</TableCell>
</TableRow>
)}
Expand Down