Skip to content
This repository has been archived by the owner on Nov 26, 2024. It is now read-only.

Commit

Permalink
fix: fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
claustra01 committed Aug 10, 2024
1 parent a93ec20 commit f22ae78
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 29 deletions.
28 changes: 14 additions & 14 deletions src/components/responsive/homePC/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,22 @@ import styles from "./index.module.css";
function HomePC() {
const navigate = useNavigate();
const setRef = useSocketRefStore((state) => state.setRef);

const handleClick = () => {
requestPermission();
const socketRef = new WebSocket(
`wss://${import.meta.env.VITE_HOST_NAME || "virtual-natsumatsuri-3jpy6th4da-an.a.run.app"}/ws?room_id=2`
);
setRef({ current: socketRef });
const audio = new Audio("/sound/wadaiko.mp3");
audio
.play()
.then(() => {
setTimeout(() => {}, 500);
})
.catch((error) => {
console.error("オーディオの音が出なかった", error);
});
const socketRef = new WebSocket(
`wss://${import.meta.env.VITE_HOST_NAME || "virtual-natsumatsuri-3jpy6th4da-an.a.run.app"}/ws?room_id=2`,
);
setRef({ current: socketRef });
const audio = new Audio("/sound/wadaiko.mp3");
audio
.play()
.then(() => {
setTimeout(() => {}, 500);
})
.catch((error) => {
console.error("オーディオの音が出なかった", error);
});
navigate("/yatai");
};

Expand Down
30 changes: 15 additions & 15 deletions src/components/responsive/homeSP/index.tsx
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
import { useNavigate } from "react-router-dom";
import { useSocketRefStore } from "../../../store";
import { requestPermission } from "../../../utils/permission";
import { DefaultButton } from "../../ui/Button";
import styles from "./index.module.css";
import { useSocketRefStore } from "../../../store";

function HomeSP() {
const navigate = useNavigate();
const setRef = useSocketRefStore((state) => state.setRef);

const handleClick = () => {
requestPermission();
const socketRef = new WebSocket(
`wss://${import.meta.env.VITE_HOST_NAME || "virtual-natsumatsuri-3jpy6th4da-an.a.run.app"}/ws?room_id=2`
);
setRef({ current: socketRef });
const audio = new Audio("/sound/wadaiko.mp3");
audio
.play()
.then(() => {
setTimeout(() => {}, 500);
})
.catch((error) => {
console.error("オーディオの音が出なかった", error);
});
const socketRef = new WebSocket(
`wss://${import.meta.env.VITE_HOST_NAME || "virtual-natsumatsuri-3jpy6th4da-an.a.run.app"}/ws?room_id=2`,
);
setRef({ current: socketRef });
const audio = new Audio("/sound/wadaiko.mp3");
audio
.play()
.then(() => {
setTimeout(() => {}, 500);
})
.catch((error) => {
console.error("オーディオの音が出なかった", error);
});
navigate("/shooter");
};

Expand Down

0 comments on commit f22ae78

Please sign in to comment.