Skip to content

Commit

Permalink
Merge pull request #11061 from LianaHarris360/classes_list_loading_state
Browse files Browse the repository at this point in the history
Add loader to YourClasses component
  • Loading branch information
MisRob authored Aug 9, 2023
2 parents 29208dc + a2abae3 commit 6e2035f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 5 additions & 2 deletions kolibri/plugins/learn/assets/src/views/YourClasses/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,9 @@
</CardLink>
</CardGrid>

<p v-else>
<p v-else-if="!loading">
{{ $tr('noClasses') }}
</p>

</section>

</template>
Expand Down Expand Up @@ -80,6 +79,10 @@
required: false,
default: false,
},
loading: {
type: Boolean,
default: null,
},
},
data() {
return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<YourClasses
v-if="isUserLoggedIn"
:classes="classrooms"
:loading="loading"
/>
<AuthMessage v-else authorizedRole="learner" />
</LearnAppBarPage>
Expand Down Expand Up @@ -42,6 +43,9 @@
computed: {
...mapGetters(['isUserLoggedIn']),
...mapState('classes', ['classrooms']),
...mapState({
loading: state => state.core.loading,
}),
breadcrumbs() {
return [
{
Expand Down

0 comments on commit 6e2035f

Please sign in to comment.