mirror of
https://github.com/duckietm/Nitro-V3.git
synced 2026-06-19 15:06:20 +00:00
fix(types): unblock CI typecheck on Dev
Two pre-existing tsgo failures surfaced by the loading-screen redesign PR: 1. AvatarEffectsView: import loadGamedata via the umbrella `@nitrots/nitro-renderer` instead of `@nitrots/utils`. The deep sub-package alias only exists in vite.config.mjs; tsgo resolves against node_modules, where only the umbrella is symlinked. Same symbol — index.ts re-exports `* from '@nitrots/utils'`. 2. DraggableWindow: `useRef<HTMLDivElement>()` -> `useRef<HTMLDivElement>(null)`. React 19 typings now require an initial value. Fixed once ina39aa37, re-introduced by the merge in03bebe4.
This commit is contained in:
@@ -30,7 +30,7 @@ export const DraggableWindow: FC<DraggableWindowProps> = props =>
|
||||
const [isDragging, setIsDragging] = useState(false);
|
||||
const [isPositioned, setIsPositioned] = useState(false);
|
||||
const [dragHandler, setDragHandler] = useState<HTMLElement>(null);
|
||||
const elementRef = useRef<HTMLDivElement>();
|
||||
const elementRef = useRef<HTMLDivElement>(null);
|
||||
const bringToTop = useCallback(() => {
|
||||
let zIndex = 400;
|
||||
for (const existingWindow of CURRENT_WINDOWS)
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { AddLinkEventTracker, AvatarDirectionAngle, AvatarEffectActivatedComposer, GetConfiguration, GetSessionDataManager, ILinkEventTracker, RemoveLinkEventTracker } from '@nitrots/nitro-renderer';
|
||||
import { loadGamedata } from '@nitrots/utils';
|
||||
import { AddLinkEventTracker, AvatarDirectionAngle, AvatarEffectActivatedComposer, GetConfiguration, GetSessionDataManager, ILinkEventTracker, loadGamedata, RemoveLinkEventTracker } from '@nitrots/nitro-renderer';
|
||||
import { ChangeEvent, FC, useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
||||
import { FaChevronLeft, FaChevronRight, FaSearch } from 'react-icons/fa';
|
||||
import { LocalizeText, SendMessageComposer } from '../../api';
|
||||
|
||||
Reference in New Issue
Block a user