Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
Signed-off-by: tygao <tygao@amazon.com>
  • Loading branch information
raintygao committed Aug 14, 2024
1 parent 2c770f4 commit 52a3e1d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,12 @@ export const WorkspaceDetailApp = (props: WorkspaceDetailProps) => {
text: currentWorkspace.name,
});
breadcrumbs.push({
text: `${currentWorkspace.name} ${i18n.translate('workspace.detail.title', {
defaultMessage: 'settings',
})}`,
text: i18n.translate('workspace.detail.title', {
defaultMessage: '{name} settings',
values: {
name: currentWorkspace.name,
},
}),
});
}
chrome?.setBreadcrumbs(breadcrumbs);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export const WorkspaceList = ({ registeredUseCases$ }: WorkspaceListProps) => {
}, [workspaceList, queryInput]);

const workspaceCreateUrl = useMemo(() => {
if (!application || !http) {
if (!application) {
return '';
}

Expand All @@ -92,10 +92,9 @@ export const WorkspaceList = ({ registeredUseCases$ }: WorkspaceListProps) => {
if (!appUrl) return '';

return cleanWorkspaceId(appUrl);
}, [application, http]);
}, [application]);

const renderCreateWorkspaceButton = () => {
if (!isDashboardAdmin) return null;
const button = (
<EuiSmallButton
href={workspaceCreateUrl}
Expand Down Expand Up @@ -210,7 +209,7 @@ export const WorkspaceList = ({ registeredUseCases$ }: WorkspaceListProps) => {
]}
setMountPoint={application?.setAppDescriptionControls}
/>
{renderCreateWorkspaceButton()}
{isDashboardAdmin && renderCreateWorkspaceButton()}
<EuiPageBody panelled>
<EuiPageContent
verticalPosition="center"
Expand Down

0 comments on commit 52a3e1d

Please sign in to comment.