linguabot commited on
Commit
ef387e3
·
verified ·
1 Parent(s): fc30ad4

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. client/src/pages/TutorialTasks.tsx +2 -2
client/src/pages/TutorialTasks.tsx CHANGED
@@ -1,4 +1,4 @@
1
- import React, { useState, useEffect, useCallback, useRef } from 'react';
2
  import { useNavigate } from 'react-router-dom';
3
  import { api } from '../services/api';
4
  import {
@@ -184,7 +184,7 @@ const TutorialTasks: React.FC = () => {
184
  };
185
 
186
  // Initialize scroll preservation helper once
187
- useEffect(() => {
188
  withPreservedScroll.current = (fn: () => void) => {
189
  try {
190
  const y = window.scrollY;
 
1
+ import React, { useState, useEffect, useCallback, useRef, useLayoutEffect } from 'react';
2
  import { useNavigate } from 'react-router-dom';
3
  import { api } from '../services/api';
4
  import {
 
184
  };
185
 
186
  // Initialize scroll preservation helper once
187
+ useLayoutEffect(() => {
188
  withPreservedScroll.current = (fn: () => void) => {
189
  try {
190
  const y = window.scrollY;