diff --git a/www/app/[domain]/transcripts/[transcriptId]/correct/page.tsx b/www/app/[domain]/transcripts/[transcriptId]/correct/page.tsx
index 4695a431..a0e55c30 100644
--- a/www/app/[domain]/transcripts/[transcriptId]/correct/page.tsx
+++ b/www/app/[domain]/transcripts/[transcriptId]/correct/page.tsx
@@ -51,7 +51,7 @@ export default function TranscriptCorrect({
return (
-
+
{
if (!topics.loading && !currentTopic) {
- setCurrentTopic(topics?.topics?.at(0));
+ const sessionTopic = window.localStorage.getItem(
+ transcriptId + "correct",
+ );
+ console.log(sessionTopic, window.localStorage);
+ if (sessionTopic && topics?.topics?.find((t) => t.id == sessionTopic)) {
+ setCurrentTopic(topics?.topics?.find((t) => t.id == sessionTopic));
+ console.log("he", sessionTopic, !!sessionTopic);
+ } else {
+ setCurrentTopic(topics?.topics?.at(0));
+ console.log("hi");
+ }
}
}, [topics.loading]);
+ // console.log(currentTopic)
const number = topics.topics?.findIndex(
(topic) => topic.id == currentTopic?.id,
@@ -43,6 +54,13 @@ export default function TopicHeader({
canGoNext && setCurrentTopic(topics.topics?.at(number + 1));
};
+ useEffect(() => {
+ console.log(currentTopic?.id);
+
+ currentTopic?.id &&
+ window.localStorage.setItem(transcriptId + "correct", currentTopic?.id);
+ }, [currentTopic?.id]);
+
const keyHandler = (e) => {
if (e.key == "ArrowLeft") {
onPrev();
diff --git a/www/app/[domain]/transcripts/[transcriptId]/correct/topicWords.tsx b/www/app/[domain]/transcripts/[transcriptId]/correct/topicWords.tsx
index 0c420463..2cd5a483 100644
--- a/www/app/[domain]/transcripts/[transcriptId]/correct/topicWords.tsx
+++ b/www/app/[domain]/transcripts/[transcriptId]/correct/topicWords.tsx
@@ -150,17 +150,18 @@ const topicWords = ({
participants.response
) {
return (
-
+
{topicWithWords.response.wordsPerSpeaker.map(
(speakerWithWords, index) => (
-
+
{getSpeakerName(speakerWithWords.speaker)} :