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

ぬるぬる動くようになった #49

Merged
merged 12 commits into from
Aug 19, 2024
6 changes: 1 addition & 5 deletions src/components/Gallery/index.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
import { useNavigate } from "react-router-dom";
import { useRoomIdStore, useTargetStatusStore } from "../../store";
import { useRoomIdStore } from "../../store";
import styles from "./index.module.css";

function Gallery() {
const navigate = useNavigate();
const updateUUID = useRoomIdStore((state) => state.updateUUID);
const resetTargetStatus = useTargetStatusStore(
(state) => state.resetTargetStatus,
);

const handleClick = () => {
resetTargetStatus();
updateUUID();
navigate("/");
};
11 changes: 11 additions & 0 deletions src/pages/yatai/index.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
import { useEffect } from "react";
import Gallery from "../../components/Gallery";
import { TargetOverlay } from "../../components/Yatai/TargetOverlay";
import { YataiStage } from "../../components/Yatai/YataiStage";
import { useTargetStatusStore } from "../../store";
import styles from "./index.module.css";

function Yatai() {
const resetTargetStatus = useTargetStatusStore(
(state) => state.resetTargetStatus,
);

// init target status
useEffect(() => {
resetTargetStatus();
}, [resetTargetStatus]);

return (
<div className={styles.container}>
<YataiStage />