]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-21232 Show spinner while loading projects/apps
authorDavid Cho-Lerat <david.cho-lerat@sonarsource.com>
Thu, 18 Jan 2024 14:46:36 +0000 (15:46 +0100)
committersonartech <sonartech@sonarsource.com>
Fri, 19 Jan 2024 20:02:55 +0000 (20:02 +0000)
server/sonar-web/src/main/js/apps/projects/components/ProjectsList.tsx

index 43fea64f1e36187ea45a828166e9bf51fc81a79c..c2e647a2e33c44d4dfc7937001b1f7401dbd2788 100644 (file)
@@ -17,6 +17,8 @@
  * along with this program; if not, write to the Free Software Foundation,
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
+
+import { Spinner } from 'design-system';
 import * as React from 'react';
 import { AutoSizer } from 'react-virtualized/dist/commonjs/AutoSizer';
 import { List, ListRowProps } from 'react-virtualized/dist/commonjs/List';
@@ -93,7 +95,9 @@ export default class ProjectsList extends React.PureComponent<Props> {
   };
 
   renderList() {
-    return (
+    return this.props.loading ? (
+      <Spinner />
+    ) : (
       <AutoSizer>
         {({ height, width }) => (
           <List