diff --git a/src/hooks/useSocketReciever.ts b/src/hooks/useSocketReceiver.ts similarity index 94% rename from src/hooks/useSocketReciever.ts rename to src/hooks/useSocketReceiver.ts index c62ff8f..85919df 100644 --- a/src/hooks/useSocketReciever.ts +++ b/src/hooks/useSocketReceiver.ts @@ -2,7 +2,7 @@ import { useEffect } from "react"; import { useSocketRefStore } from "../store"; import type { ActionSchema, HitSchema, PointerSchema } from "../type/shooting"; -export const useSocketReciever = () => { +export const useSocketReceiver = () => { const socketRef = useSocketRefStore((state) => state.socketRef); const onMessage = ( diff --git a/src/pages/shooter/index.tsx b/src/pages/shooter/index.tsx index 9488da6..1838a24 100644 --- a/src/pages/shooter/index.tsx +++ b/src/pages/shooter/index.tsx @@ -8,7 +8,7 @@ import { DefaultButton } from "../../components/ui/Button"; import { Modal } from "../../components/ui/Modal"; import { ShooterButton } from "../../components/ui/ShooterButton"; import { useOrientation } from "../../hooks/useOrientation"; -import { useSocketReciever } from "../../hooks/useSocketReciever"; +import { useSocketReceiver } from "../../hooks/useSocketReceiver"; import { useSocketRefStore, useUUIDStore } from "../../store"; import { type Schema, event_type, message_type } from "../../type/schema"; import { MessageType } from "../../type/shooting"; @@ -18,7 +18,7 @@ const Shooter = () => { const [isOpen, setIsOpen] = useState(true); const [score, setScore] = useState(0); const { orientationDiff } = useOrientation(); - const { onMessage } = useSocketReciever(); + const { onMessage } = useSocketReceiver(); const socketRef = useSocketRefStore((state) => state.socketRef); const initialImages = [ diff --git a/src/pages/yatai/index.tsx b/src/pages/yatai/index.tsx index 86122fa..024f3ff 100644 --- a/src/pages/yatai/index.tsx +++ b/src/pages/yatai/index.tsx @@ -9,8 +9,8 @@ import type { Object3DEventMap, } from "three"; import { randFloat } from "three/src/math/MathUtils.js"; -import { useSocketReciever } from "../../hooks/useSocketReciever"; -import { useSocketRefStore } from "../../store"; +import { useSocketReceiver } from "../../hooks/useSocketReceiver"; + import { type ActionSchema, MessageType, @@ -50,7 +50,7 @@ const YataiStage = memo(() => { // 的 const Target = (props: ThreeElements["mesh"]) => { - const { onMessage } = useSocketReciever(); + const { onMessage } = useSocketReceiver(); const position = props.position as [number, number, number]; const args: [number, number, number] = [0.7, 2, 0.7]; @@ -148,7 +148,7 @@ const YataiStage = memo(() => { }); const TargetOverlay = () => { - const { onMessage } = useSocketReciever(); + const { onMessage } = useSocketReceiver(); useEffect(() => { onMessage((data) => {