Skip to content
This repository has been archived by the owner on May 14, 2023. It is now read-only.

Commit

Permalink
Add loading animation to career item
Browse files Browse the repository at this point in the history
  • Loading branch information
AdityaKhatri committed Jun 24, 2020
1 parent 009e1b8 commit 649ff58
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
22 changes: 14 additions & 8 deletions client/src/views/Career/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import PropTypes from 'prop-types';
import { Link } from 'react-router-dom';

import ListView from '#rscv/List/ListView';
import LoadingAnimation from '#rscv/LoadingAnimation';

import {
RequestCoordinator,
Expand Down Expand Up @@ -46,6 +47,7 @@ function Career(props) {
const {
requests: {
careerGet: {
pending,
response = [],
},
},
Expand Down Expand Up @@ -87,14 +89,18 @@ function Career(props) {
</p>
</div>
<div className={styles.content}>
<ListView
className={styles.career}
emptyComponent={EmptyComponent}
keyExtractor={careerKeySelector}
data={response}
renderer={CareerItem}
rendererParams={careerItemsRendererParams}
/>
{!pending ? (
<LoadingAnimation />
) : (
<ListView
className={styles.career}
emptyComponent={EmptyComponent}
keyExtractor={careerKeySelector}
data={response}
renderer={CareerItem}
rendererParams={careerItemsRendererParams}
/>
)}
</div>
<div className={styles.footer}>
<div className={styles.innerChild}>
Expand Down
1 change: 1 addition & 0 deletions client/src/views/Career/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@

.content {
display: flex;
position: relative;
flex-direction: column;
flex-grow: 1;
width: 100vw;
Expand Down

0 comments on commit 649ff58

Please sign in to comment.