Skip to content

Commit

Permalink
fix(localisations): change spinner for pagespinner
Browse files Browse the repository at this point in the history
  • Loading branch information
Mihoub2 committed Nov 14, 2023
1 parent faf59e4 commit 6078810
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/components/blocs/localisations/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import api from '../../../utils/api';
import { formatDescriptionDates } from '../../../utils/dates';
import { deleteError, deleteSuccess, saveError, saveSuccess } from '../../../utils/notice-contents';
import GeographicalTags from '../geographical-tags';
import { Spinner } from '../../spinner';
import { PageSpinner } from '../../spinner';

export default function LocalisationsComponent() {
const { editMode } = useEditMode();
Expand Down Expand Up @@ -118,7 +118,15 @@ export default function LocalisationsComponent() {
};

if (error) return <div>Erreur</div>;
if (isLoading) return <Spinner />;
if (isLoading) {
return (
<Row className="flex--space-between">
<Col>
<PageSpinner />
</Col>
</Row>
);
}

const currentLocalisation = data.data.find((item) => item.current === true);
const inactives = data.data.filter((el) => (el.current === false)).sort((a, b) => a.startDate - b.startDate);
Expand Down

0 comments on commit 6078810

Please sign in to comment.