📌fix: Optimize imports
- Reformat code - Optimize imports - Rearrange code - isGlobalLoaing 구문 추가 -> StuffSubHeader.jsx
This commit is contained in:
parent
0dfc2c415e
commit
24db76fa01
@ -1,7 +1,9 @@
|
|||||||
import StuffSearchCondition from '@/components/management/StuffSearchCondition'
|
|
||||||
import Stuff from '@/components/management/Stuff'
|
import Stuff from '@/components/management/Stuff'
|
||||||
|
import StuffSearchCondition from '@/components/management/StuffSearchCondition'
|
||||||
import StuffSubHeader from '@/components/management/StuffSubHeader'
|
import StuffSubHeader from '@/components/management/StuffSubHeader'
|
||||||
|
|
||||||
import '@/styles/grid.scss'
|
import '@/styles/grid.scss'
|
||||||
|
|
||||||
export default async function ManagementStuffPage() {
|
export default async function ManagementStuffPage() {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
|||||||
@ -1,19 +1,26 @@
|
|||||||
'use client'
|
'use client'
|
||||||
|
|
||||||
import { useEffect } from 'react'
|
import { useContext, useEffect } from 'react'
|
||||||
|
|
||||||
import Link from 'next/link'
|
import Link from 'next/link'
|
||||||
import Image from 'next/image'
|
import Image from 'next/image'
|
||||||
import { useMessage } from '@/hooks/useMessage'
|
|
||||||
import { useRouter, useSearchParams } from 'next/navigation'
|
import { useRouter, useSearchParams } from 'next/navigation'
|
||||||
import { floorPlanObjectState } from '@/store/floorPlanObjectAtom'
|
|
||||||
import { useSetRecoilState } from 'recoil'
|
import { useSetRecoilState } from 'recoil'
|
||||||
|
|
||||||
|
import { QcastContext } from '@/app/QcastProvider'
|
||||||
|
import { useMessage } from '@/hooks/useMessage'
|
||||||
|
import { floorPlanObjectState } from '@/store/floorPlanObjectAtom'
|
||||||
import { queryStringFormatter } from '@/util/common-utils'
|
import { queryStringFormatter } from '@/util/common-utils'
|
||||||
|
|
||||||
export default function StuffSubHeader({ type }) {
|
export default function StuffSubHeader({ type }) {
|
||||||
const { getMessage } = useMessage()
|
const { getMessage } = useMessage()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
|
|
||||||
const setFloorPlanObjectNo = useSetRecoilState(floorPlanObjectState)
|
const setFloorPlanObjectNo = useSetRecoilState(floorPlanObjectState)
|
||||||
|
|
||||||
|
const { isGlobalLoading } = useContext(QcastContext)
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
window.scrollTo(0, 0)
|
window.scrollTo(0, 0)
|
||||||
}, [])
|
}, [])
|
||||||
@ -35,6 +42,7 @@ export default function StuffSubHeader({ type }) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
!isGlobalLoading && (
|
||||||
<>
|
<>
|
||||||
<div className="sub-header">
|
<div className="sub-header">
|
||||||
<div className="sub-header-inner">
|
<div className="sub-header-inner">
|
||||||
@ -116,4 +124,5 @@ export default function StuffSubHeader({ type }) {
|
|||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user