refactor: type improvements (#751)

This commit is contained in:
Carlos Valente
2024-01-31 14:42:33 +01:00
committed by GitHub
parent 7eb9ee8d03
commit cf08bfc796
17 changed files with 48 additions and 37 deletions
@@ -7,7 +7,7 @@ import { IoTrashOutline } from '@react-icons/all-files/io5/IoTrashOutline';
import { SupportedEvent } from 'ontime-types';
import { useEventAction } from '../../common/hooks/useEventAction';
import { useEventSelection } from '../../features/rundown/useEventSelection';
import { useEventSelection } from '../rundown/useEventSelection';
const RundownMenu = ({ children }: { children: ReactNode }) => {
const { clearSelectedEvents } = useEventSelection();
@@ -52,7 +52,7 @@ export default function Operator() {
const scrollRef = useRef<HTMLDivElement | null>(null);
const scrollToComponent = useFollowComponent({
followRef: selectedRef,
scrollRef: scrollRef,
scrollRef,
doFollow: !lockAutoScroll,
topOffset: selectedOffset,
});
@@ -44,7 +44,7 @@ export const useEventSelection = create<EventSelectionStore>()((set, get) => ({
selectedEvents.delete(id);
return set({
selectedEvents: selectedEvents,
selectedEvents,
anchoredIndex: newAnchoredIndex?.index ?? 0,
});
}