diff --git a/src/app/[locale]/page.js b/src/app/[locale]/page.js index b45f2690..aa5d3f7e 100644 --- a/src/app/[locale]/page.js +++ b/src/app/[locale]/page.js @@ -1,9 +1,8 @@ -import { getSession } from '@/lib/authActions' // import { getCurrentLocale } from '@/locales/server' import MainPage from '@/components/Main' export default async function page() { - const session = await getSession() + // const session = await getSession() // const currentLocale = getCurrentLocale() diff --git a/src/components/common/draggable/withDraggable.jsx b/src/components/common/draggable/withDraggable.jsx index 9f322583..b6c2920b 100644 --- a/src/components/common/draggable/withDraggable.jsx +++ b/src/components/common/draggable/withDraggable.jsx @@ -1,15 +1,19 @@ 'use client' -import { useState } from 'react' +import { useEffect, useState } from 'react' import Draggable from 'react-draggable' -export default function WithDraggable({ isShow, children }) { +export default function WithDraggable({ isShow, children, pos }) { const [position, setPosition] = useState({ x: 0, y: 0 }) const handleOnDrag = (data) => { setPosition({ x: data.x, y: data.y }) } + useEffect(() => { + setPosition({ ...pos }) + }, []) + return ( <> {isShow && ( diff --git a/src/components/floor-plan/MenuDepth01.jsx b/src/components/floor-plan/MenuDepth01.jsx index 08eac1f4..170fd820 100644 --- a/src/components/floor-plan/MenuDepth01.jsx +++ b/src/components/floor-plan/MenuDepth01.jsx @@ -33,7 +33,7 @@ export default function MenuDepth01(props) {