Skip to content

Commit

Permalink
Merge pull request #223 from fcoronelmakingsense/reports-page-spinner…
Browse files Browse the repository at this point in the history
…-ranking

fix: reports ranking spinner
  • Loading branch information
fcoronelmakingsense authored May 24, 2019
2 parents e2fc620 + d05bdd1 commit 693ec2b
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 20 deletions.
4 changes: 2 additions & 2 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
-->

<link rel="manifest" href="%PUBLIC_URL%/manifest.json">
<link rel="stylesheet" type="text/css" href="https://cdn.fromdoppler.com/doppler-ui-library/v1.0.1/css/styles.css">
<link rel="stylesheet" type="text/css" href="https://cdn.fromdoppler.com/doppler-ui-library/v1.0.2/css/styles.css">
<link rel="stylesheet" type="text/css" href="zoho-chat.css">
<!--
Notice the use of %PUBLIC_URL% in the tags above.
Expand Down Expand Up @@ -47,7 +47,7 @@
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
<script type="text/javascript" src="https://cdn.fromdoppler.com/doppler-ui-library/v1.0.1/js/app.js"></script>
<script type="text/javascript" src="https://cdn.fromdoppler.com/doppler-ui-library/v1.0.2/js/app.js"></script>
<script type="text/javascript" src="zoho-chat.js"></script>
</body>
</html>
13 changes: 2 additions & 11 deletions src/components/Loading/Loading.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,12 @@
import React from 'react';
import { FormattedMessage } from 'react-intl';

export default function({ page }) {
if (page) {
return (
<div className="wrapper-loading">
<div className="loading-page">
<p id="loading" className="flash">
&nbsp;
</p>
</div>
<div className="loading-page" />
</div>
);
}
return (
<div>
<FormattedMessage id="loading" />
</div>
);
return <div className="loading-box" />;
}
3 changes: 2 additions & 1 deletion src/components/Reports/Reports.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
SiteTrackingNotAvailableReasons,
} from '../SiteTrackingRequired/SiteTrackingRequired';
import { Helmet } from 'react-helmet';
import Loading from '../Loading/Loading';

class Reports extends React.Component {
/**
Expand Down Expand Up @@ -77,7 +78,7 @@ class Reports extends React.Component {
changePeriod={this.changePeriod}
/>
{!this.state.domains ? (
<div className="loading-box" />
<Loading />
) : (
<section className="container-reports">
<div className="wrapper-kpi">
Expand Down
13 changes: 7 additions & 6 deletions src/components/Reports/ReportsPageRanking/ReportsPageRanking.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react';
import { InjectAppServices } from '../../../services/pure-di';
import { FormattedMessage } from 'react-intl';
import Loading from '../../Loading/Loading';

class ReportsPageRanking extends React.Component {
constructor({ dependencies: { datahubClient } }) {
Expand Down Expand Up @@ -68,10 +69,10 @@ class ReportsPageRanking extends React.Component {

return (
<>
{pages === null ? (
<div className="loading-box" />
) : (
<div className="wrapper-ranking">
<div className="wrapper-ranking">
{pages === null ? (
<Loading />
) : (
<div className="reports-box">
<h4 className="title-ranking">
<FormattedMessage id="reports_pageranking.top_pages" />
Expand Down Expand Up @@ -100,8 +101,8 @@ class ReportsPageRanking extends React.Component {
</div>
))}
</div>
</div>
)}
)}
</div>
</>
);
}
Expand Down

0 comments on commit 693ec2b

Please sign in to comment.