Skip to content

Commit

Permalink
Merge pull request #80 from DDD-Community/feat/#58
Browse files Browse the repository at this point in the history
[feat/#58] 빌드 실패 이슈 해결
  • Loading branch information
G-hoon authored Sep 23, 2024
2 parents 47703eb + a2d6c86 commit 82e88d0
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions src/components/PoseDetector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { useSendPose } from "@/hooks/usePoseMutation"
import usePushNotification from "@/hooks/usePushNotification"
import { useCreateSnaphot } from "@/hooks/useSnapshotMutation"
import { useNotificationStore } from "@/store/NotificationStore"
import { useSnapshotStore } from "@/store/SnapShotStore"
import { useSnapShotStore } from "@/store/SnapshotStore"
import type { pose } from "@/utils/detector"
import { detectHandOnChin, detectSlope, detectTailboneSit, detectTextNeck } from "@/utils/detector"
import { drawPose } from "@/utils/drawer"
Expand Down Expand Up @@ -49,7 +49,7 @@ const PoseDetector: React.FC = () => {

const canvasRef = useRef<HTMLCanvasElement>(null)

const { isSnapShotSaved, snapshot, setSnapShot } = useSnapshotStore()
const { isSnapShotSaved, snapshot, setSnapShot } = useSnapShotStore()
const createSnapMutation = useCreateSnaphot()
const sendPoseMutation = useSendPose()

Expand Down
4 changes: 2 additions & 2 deletions src/components/Posture/PostrueCrew.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import RankingGuideToolTip from "@assets/images/ranking-guide.png"
import SelectBox from "@components/SelectBox"
import { ReactElement, useCallback, useEffect, useRef, useState } from "react"
import { modals } from "../Modal/Modals"
import { useSnapshotStore } from "@/store/SnapShotStore"
import { useSnapShotStore } from "@/store/SnapshotStore"
import { useCreateSnaphot } from "@/hooks/useSnapshotMutation"

interface IPostureCrew {
Expand Down Expand Up @@ -47,7 +47,7 @@ const UPDATE_INTERVAL = 1000 // 1초마다 상태 업데이트
export default function PostrueCrew(props: PostureCrewProps): ReactElement {
const { toggleSidebar } = props
const accessToken = useAuthStore((state) => state.accessToken)
const { resetSnapShot } = useSnapshotStore()
const { resetSnapShot } = useSnapShotStore()
const { openModal } = useModals()
const createSnapMutation = useCreateSnaphot()
const [crews, setCrews] = useState<IPostureCrew[]>([])
Expand Down
4 changes: 2 additions & 2 deletions src/components/SideNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import AnalysisIcon from "@assets/icons/side-nav-analysis-icon.svg?react"
import CrewIcon from "@assets/icons/side-nav-crew-icon.svg?react"
import MonitoringIcon from "@assets/icons/side-nav-monitor-icon.svg?react"
import { Link, useLocation, useNavigate } from "react-router-dom"
import { useSnapshotStore } from "@/store/SnapShotStore"
import { useSnapShotStore } from "@/store/SnapshotStore"
import { useMemo } from "react"
import { clearAccessToken } from "@/api/axiosInstance"
import { useNotificationStore } from "@/store/NotificationStore"
Expand Down Expand Up @@ -35,7 +35,7 @@ export default function SideNav(): React.ReactElement {

const logoutHandler = (): void => {
const clearUser = useAuthStore.persist.clearStorage
const clearSnapshot = useSnapshotStore.persist.clearStorage
const clearSnapshot = useSnapShotStore.persist.clearStorage
const clearNotification = useNotificationStore.persist.clearStorage

clearUser()
Expand Down
4 changes: 2 additions & 2 deletions src/pages/AuthPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Login from "@/components/Login"
import { useOauth, useSignUp, useSignIn, useGetIsSignUp } from "@/hooks/useAuthMutation"
import RoutePath from "@/constants/routes.json"
import { useAuthStore } from "@/store/AuthStore"
import { useSnapshotStore } from "@/store/SnapShotStore"
import { useSnapShotStore } from "@/store/SnapshotStore"
import { useGetRecentSnapshot } from "@/hooks/useSnapshotMutation"
import { useGetNoti } from "@/hooks/useNotiMutation"
import { useNotificationStore } from "@/store/NotificationStore"
Expand All @@ -22,7 +22,7 @@ const AuthPage: React.FC = () => {
const [isError, setIsError] = useState(false)

const setUser = useAuthStore((state) => state.setUser)
const setSnap = useSnapshotStore((state) => state.setSnapShot)
const setSnap = useSnapShotStore((state) => state.setSnapShot)
const setNoti = useNotificationStore((state) => state.setNotification)

useEffect(() => {
Expand Down
4 changes: 2 additions & 2 deletions src/pages/MonitoringPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import PostrueCrew from "@/components/Posture/PostrueCrew"
import GroupSideIcon from "@assets/icons/group-side-nav-button.svg?react"
import React, { useEffect, useState } from "react"
import { useGetRecentSnapshot } from "@/hooks/useSnapshotMutation"
import { useSnapshotStore } from "@/store/SnapShotStore"
import { useSnapShotStore } from "@/store/SnapshotStore"
import usePushNotification from "@/hooks/usePushNotification"
import { useGuidePopup } from "@/hooks/useGuidePopup"

Expand All @@ -12,7 +12,7 @@ const MonitoringPage: React.FC = () => {
const getRecentSnapMutation = useGetRecentSnapshot()

const { isPopupOpen } = useGuidePopup()
const { snapshot, setSnapShot } = useSnapshotStore()
const { snapshot, setSnapShot } = useSnapShotStore()

const [isSidebarOpen, setIsSidebarOpen] = useState<boolean>(true)

Expand Down
6 changes: 3 additions & 3 deletions src/store/SnapshotStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ import { keypoint } from "@/utils"
import { create } from "zustand"
import { persist } from "zustand/middleware"

interface SnapshotState {
interface SnapShotState {
isSnapShotSaved: boolean
snapshot: keypoint[] | null
setSnapShot: (snapshot: keypoint[] | null) => void
resetSnapShot: () => void
}

export const useSnapshotStore = create(
persist<SnapshotState>(
export const useSnapShotStore = create(
persist<SnapShotState>(
(set) => ({
isSnapShotSaved: false,
snapshot: null,
Expand Down

0 comments on commit 82e88d0

Please sign in to comment.