aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/account/notifications/Projects.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'server/sonar-web/src/main/js/apps/account/notifications/Projects.tsx')
-rw-r--r--server/sonar-web/src/main/js/apps/account/notifications/Projects.tsx31
1 files changed, 17 insertions, 14 deletions
diff --git a/server/sonar-web/src/main/js/apps/account/notifications/Projects.tsx b/server/sonar-web/src/main/js/apps/account/notifications/Projects.tsx
index 47b5d19ba8a..c19a5f63ce8 100644
--- a/server/sonar-web/src/main/js/apps/account/notifications/Projects.tsx
+++ b/server/sonar-web/src/main/js/apps/account/notifications/Projects.tsx
@@ -104,11 +104,23 @@ export default class Projects extends React.PureComponent<Props, State> {
{translate('my_profile.per_project_notifications.title')}
</Heading>
- <Button onClick={this.openModal} variety={ButtonVariety.Primary}>
- <span data-test="account__add-project-notification">
- {translate('my_profile.per_project_notifications.add')}
- </span>
- </Button>
+ <div className="sw-flex sw-gap-4">
+ {allProjects.length > 0 && (
+ <div className="sw-mb-4">
+ <InputSearch
+ size="large"
+ onChange={this.handleSearch}
+ placeholder={translate('search.search_for_projects')}
+ />
+ </div>
+ )}
+
+ <Button onClick={this.openModal} variety={ButtonVariety.Primary}>
+ <span data-test="account__add-project-notification">
+ {translate('my_profile.per_project_notifications.add')}
+ </span>
+ </Button>
+ </div>
</div>
{this.state.showModal && (
@@ -124,15 +136,6 @@ export default class Projects extends React.PureComponent<Props, State> {
<Note>{translate('my_account.no_project_notifications')}</Note>
)}
- {allProjects.length > 0 && (
- <div className="sw-mb-4">
- <InputSearch
- onChange={this.handleSearch}
- placeholder={translate('search.search_for_projects')}
- />
- </div>
- )}
-
{filteredProjects.map((project) => (
<ProjectNotifications key={project.project} project={project} />
))}