From 6131fd8fc6cb1245ccfbc5d03d33ffd1498e83f4 Mon Sep 17 00:00:00 2001
From: alyssaf16 <alyssa_feinberg@brown.edu>
Date: Mon, 8 Jul 2024 15:12:16 -0400
Subject: Speech to phonemes progress

---
 src/client/views/collections/CollectionCarouselView.tsx | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

(limited to 'src/client/views/collections/CollectionCarouselView.tsx')

diff --git a/src/client/views/collections/CollectionCarouselView.tsx b/src/client/views/collections/CollectionCarouselView.tsx
index 6976deea5..c45b1494b 100644
--- a/src/client/views/collections/CollectionCarouselView.tsx
+++ b/src/client/views/collections/CollectionCarouselView.tsx
@@ -2,7 +2,7 @@
 /* eslint-disable jsx-a11y/click-events-have-key-events */
 /* eslint-disable react/jsx-props-no-spreading */
 import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
-import { action, computed, makeObservable, observable } from 'mobx';
+import { action, computed, makeObservable, observable, trace } from 'mobx';
 import { observer } from 'mobx-react';
 import { Docs } from '../../documents/Documents';
 import * as React from 'react';
@@ -56,6 +56,8 @@ export class CollectionCarouselView extends CollectionSubView() {
         Doc.setDocFilter(this.Document, 'star', undefined, 'match');
         this.layoutDoc.practiceMode = practiceMode.NORMAL;
         this.layoutDoc._carousel_index = 0;
+        this.carouselItems.forEach(item => { item.layout[this.practiceField] = undefined}); //prettier-ignore
+        console.log(this.carouselItems.length);
     }
 
     componentWillUnmount() {
@@ -202,6 +204,7 @@ export class CollectionCarouselView extends CollectionSubView() {
     };
 
     @computed get content() {
+        trace();
         if (this.layoutDoc._carousel_index === this.carouselItems.length && this.layoutDoc._carousel_index !== 0) {
             this.move(1);
         }
-- 
cgit v1.2.3-70-g09d2

