refactor: upgrade react and add compiler

This commit is contained in:
Carlos Valente
2025-07-12 17:34:29 +02:00
parent d24d5c1365
commit 1c6adbd2fd
11 changed files with 176 additions and 250 deletions
@@ -19,7 +19,7 @@ interface ScheduleContextState {
selectedEventId: string | null;
numPages: number;
visiblePage: number;
containerRef: RefObject<HTMLUListElement>;
containerRef: RefObject<HTMLUListElement | null>;
}
const ScheduleContext = createContext<ScheduleContextState | undefined>(undefined);
@@ -39,7 +39,7 @@ export const ScheduleProvider = ({ children, selectedEventId }: PropsWithChildre
const [visiblePage, setVisiblePage] = useState(0);
const lastIndex = useRef(-1);
const paginator = useRef<NodeJS.Timeout>();
const paginator = useRef<NodeJS.Timeout>(undefined);
const containerRef = useRef<HTMLUListElement>(null);
@@ -26,7 +26,7 @@ import { cleanup } from './rowObserver';
interface CuesheetBodyProps {
rowModel: RowModel<OntimeEntry>;
selectedRef: RefObject<HTMLTableRowElement>;
selectedRef: RefObject<HTMLTableRowElement | null>;
table: Table<OntimeEntry>;
}