Skip to content

Commit 497c976

Browse files
committed
feat(fronstage): add autoscroll
1 parent 4bd6d52 commit 497c976

File tree

1 file changed

+2
-2
lines changed
  • src/frontstage/src/app/projects/[id]

1 file changed

+2
-2
lines changed

src/frontstage/src/app/projects/[id]/page.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import {
2222
} from "@nextui-org/react";
2323
import { AnimatePresence, motion } from "framer-motion";
2424
import { useParams } from "next/navigation";
25-
import React, { useEffect, useMemo, useRef, useState } from "react";
25+
import React, { useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
2626
import toast from "react-hot-toast";
2727

2828
const ProjectDetailPage: React.FC = () => {
@@ -50,7 +50,7 @@ const ProjectDetailPage: React.FC = () => {
5050
refetchInterval: isPolling ? 5000 : false, // Poll every 5 seconds if isPolling is true
5151
});
5252

53-
useEffect(() => {
53+
useLayoutEffect(() => {
5454
if (logSet && logSet.length > 0) {
5555
const uniqueLogs = logSet.filter((newLog: any, index: any) => {
5656
return !logs.has(newLog);

0 commit comments

Comments
 (0)