Skip to content

Commit

Permalink
adding loaders
Browse files Browse the repository at this point in the history
  • Loading branch information
tfhuhtal committed Oct 10, 2024
1 parent 5eceb19 commit 7b0b181
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,8 @@ const MonitoringOverview = ({ t, lang, faculties }) => {
else setAccordion(sectionIndex)
}

if (!answers) return <Loader active />

return (
<div className="monitoring-overview">
<Menu size="large" className="filter-row" secondary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React, { useEffect } from 'react'
import { useSelector } from 'react-redux'
import { useTranslation } from 'react-i18next'
import { formKeys } from '@root/config/data'
import { Loader } from 'semantic-ui-react'
import { isAdmin } from '@root/config/common'
import NoPermissions from 'Components/Generic/NoPermissions'
import MonitoringOverview from './MonitoringOverview'
Expand All @@ -27,9 +28,9 @@ const FacultyMonitoringOverview = () => {
return <NoPermissions t={t} requestedForm={t('facultymonitoring')} />
}

return !faculties.pending ? (
<MonitoringOverview t={t} lang={lang} faculties={faculties} form={form} formType={formType} />
) : null
if (faculties.pending) return <Loader active />

return <MonitoringOverview t={t} lang={lang} faculties={faculties} form={form} formType={formType} />
}

export default FacultyMonitoringOverview

0 comments on commit 7b0b181

Please sign in to comment.