From bee5926b29ad503ad13b84684b50907da4616d5e Mon Sep 17 00:00:00 2001 From: K-Kizuku Date: Sun, 11 Aug 2024 02:57:39 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20id=E3=81=AE=E3=81=A4=E3=81=91=E5=BF=98?= =?UTF-8?q?=E3=82=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/shooter/index.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pages/shooter/index.tsx b/src/pages/shooter/index.tsx index 3d350f1..6e482e7 100644 --- a/src/pages/shooter/index.tsx +++ b/src/pages/shooter/index.tsx @@ -3,7 +3,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 { useSocketRefStore } from "../../store"; +import { useSocketRefStore, useUUIDStore } from "../../store"; import { type Schema, message_type } from "../../type/schema"; import style from "./index.module.css"; @@ -19,6 +19,7 @@ const Shooter = () => { ]; const [images, setImages] = useState(initialImages); + const uuid = useUUIDStore((state) => state.uuid); const handleClick = () => { const audio = new Audio("/sound/cork_sound.mp3"); @@ -29,7 +30,7 @@ const Shooter = () => { console.error("オーディオの音が出なかった", error); }); const data: Schema = { - id: "shooter", + id: uuid, interval: 0, angle: { x: orientationDiff.beta,