Skip to content

Commit

Permalink
fix: code styling issues mentioned in the previous PR openedx#1177
Browse files Browse the repository at this point in the history
  • Loading branch information
zwidekalanga committed Apr 11, 2024
1 parent 220f4fa commit 97827f2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions src/components/Admin/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -309,12 +309,10 @@ class Admin extends React.Component {
<>
<Helmet title="Learner Progress Report" />
<Hero title="Learner Progress Report" />
<div className="mt-4">
<BudgetExpiryAlertAndModal />
</div>
<div className="container-fluid">
<div className="row mt-4">
<div className="col">
<BudgetExpiryAlertAndModal />
<h2>Overview</h2>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/components/BudgetExpiryAlertAndModal/data/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const getExpirationMetadata = (endDateStr) => {
const thresholdKeys = Object.keys(ExpiryThresholds).sort((a, b) => a - b);
const thresholdKey = thresholdKeys.find((key) => durationDiff.asDays() <= key);

if (thresholdKey === undefined) {
if (!thresholdKey) {
return {
thresholdKey: null,
threshold: null,
Expand All @@ -34,7 +34,7 @@ export const getExpirationMetadata = (endDateStr) => {
export const isPlanApproachingExpiry = (endDateStr) => {
const { thresholdKey, threshold } = getExpirationMetadata(endDateStr);

if (thresholdKey === null) {
if (!thresholdKey) {
return false;
}

Expand Down

0 comments on commit 97827f2

Please sign in to comment.