Skip to content

Commit f05b28d

Browse files
Fix all ESLint errors and warnings
- HomeClient.tsx: Replaced useEffect setState with derived state - HeroScene.tsx: Removed unused isMobile parameter - HeroScene.tsx: Added shadowsEnabled to useLayoutEffect dependencies - HeroScene.tsx: Removed unused onFocusAction parameter Co-authored-by: Kinin-Code-Offical <125186556+Kinin-Code-Offical@users.noreply.github.com>
1 parent c4628b2 commit f05b28d

2 files changed

Lines changed: 2 additions & 11 deletions

File tree

src/components/HomeClient.tsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,7 @@ export default function HomeClient({ content }: HomeClientProps) {
560560
});
561561
}, []);
562562

563-
const showVirtualKeys = isMobile || virtualKeysOpen;
563+
const showVirtualKeys = isMobile || (virtualKeysOpen && dockKeysVisible);
564564

565565
const applyLanguage = (lang: "tr" | "en") => {
566566
setLanguage(lang);
@@ -656,12 +656,6 @@ export default function HomeClient({ content }: HomeClientProps) {
656656
mobileModifiersRef.current = mobileModifiers;
657657
}, [mobileModifiers]);
658658

659-
useEffect(() => {
660-
if (!dockKeysVisible && virtualKeysOpen) {
661-
setVirtualKeysOpen(false);
662-
}
663-
}, [dockKeysVisible, virtualKeysOpen]);
664-
665659
useEffect(() => {
666660
screenAspectRef.current = screenAspect;
667661
}, [screenAspect]);

src/components/hero/HeroScene.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,6 @@ function ComputerModel({
292292
onScreenMeshAction,
293293
onCameraRig,
294294
onContentReady,
295-
isMobile,
296295
usePhoneRig,
297296
shadowsEnabled,
298297
allowTerminalTexture,
@@ -307,7 +306,6 @@ function ComputerModel({
307306
onScreenMeshAction?: (mesh: Mesh | null) => void;
308307
onCameraRig?: (rig: CameraRig) => void;
309308
onContentReady?: () => void;
310-
isMobile: boolean;
311309
usePhoneRig: boolean;
312310
shadowsEnabled: boolean;
313311
allowTerminalTexture: boolean;
@@ -788,6 +786,7 @@ function ComputerModel({
788786
scene,
789787
setPlaneColor,
790788
usePhoneRig,
789+
shadowsEnabled,
791790
]);
792791

793792
useEffect(() => {
@@ -1113,7 +1112,6 @@ function SceneContent({
11131112
scrollProgressRef,
11141113
noteTexts,
11151114
onDebugAction,
1116-
onFocusAction,
11171115
onScreenAspectAction,
11181116
onReadyAction,
11191117
interactionActive,
@@ -1627,7 +1625,6 @@ function SceneContent({
16271625
onScreenMeshAction={handleScreenMesh}
16281626
onCameraRig={handleCameraRig}
16291627
onContentReady={handleContentReady}
1630-
isMobile={isMobile}
16311628
usePhoneRig={usePhoneRig}
16321629
shadowsEnabled={shadowsEnabled}
16331630
allowTerminalTexture={true}

0 commit comments

Comments
 (0)