📌GlobalSpinner 조건 수정
This commit is contained in:
parent
a78ca8bc34
commit
fe203f2905
10
src/app/community/layout.js
Normal file
10
src/app/community/layout.js
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
import { Suspense } from 'react'
|
||||||
|
import GlobalSpinner from '@/components/common/spinner/GlobalSpinner'
|
||||||
|
|
||||||
|
export default function CommunityLayout({ children }) {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<Suspense fallback={<GlobalSpinner />}>{children}</Suspense>
|
||||||
|
</>
|
||||||
|
)
|
||||||
|
}
|
||||||
@ -1,6 +1,6 @@
|
|||||||
import Estimate from '@/components/estimate/Estimate'
|
import Estimate from '@/components/estimate/Estimate'
|
||||||
|
|
||||||
export default function EstimatePage({}) {
|
export default async function EstimatePage({}) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Estimate />
|
<Estimate />
|
||||||
|
|||||||
@ -4,6 +4,8 @@ import { usePathname } from 'next/navigation'
|
|||||||
import FloorPlanProvider from './FloorPlanProvider'
|
import FloorPlanProvider from './FloorPlanProvider'
|
||||||
import FloorPlan from '@/components/floor-plan/FloorPlan'
|
import FloorPlan from '@/components/floor-plan/FloorPlan'
|
||||||
import CanvasLayout from '@/components/floor-plan/CanvasLayout'
|
import CanvasLayout from '@/components/floor-plan/CanvasLayout'
|
||||||
|
import { Suspense } from 'react'
|
||||||
|
import GlobalSpinner from '@/components/common/spinner/GlobalSpinner'
|
||||||
|
|
||||||
export default function FloorPlanLayout({ children }) {
|
export default function FloorPlanLayout({ children }) {
|
||||||
console.log('🚀 ~ FloorPlanLayout ~ FloorPlanLayout:')
|
console.log('🚀 ~ FloorPlanLayout ~ FloorPlanLayout:')
|
||||||
@ -12,16 +14,18 @@ export default function FloorPlanLayout({ children }) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<FloorPlanProvider>
|
<Suspense fallback={<GlobalSpinner />}>
|
||||||
<FloorPlan>
|
<FloorPlanProvider>
|
||||||
{/* {pathname.includes('estimate') || pathname.includes('simulator') ? (
|
<FloorPlan>
|
||||||
|
{/* {pathname.includes('estimate') || pathname.includes('simulator') ? (
|
||||||
<div className="canvas-layout">{children}</div>
|
<div className="canvas-layout">{children}</div>
|
||||||
) : (
|
) : (
|
||||||
<CanvasLayout>{children}</CanvasLayout>
|
<CanvasLayout>{children}</CanvasLayout>
|
||||||
)} */}
|
)} */}
|
||||||
<CanvasLayout>{children}</CanvasLayout>
|
<CanvasLayout>{children}</CanvasLayout>
|
||||||
</FloorPlan>
|
</FloorPlan>
|
||||||
</FloorPlanProvider>
|
</FloorPlanProvider>
|
||||||
|
</Suspense>
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import CanvasFrame from '@/components/floor-plan/CanvasFrame'
|
import CanvasFrame from '@/components/floor-plan/CanvasFrame'
|
||||||
|
|
||||||
export default function FloorPlanPage() {
|
export default async function FloorPlanPage() {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<CanvasFrame />
|
<CanvasFrame />
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import Simulator from '@/components/simulator/Simulator'
|
import Simulator from '@/components/simulator/Simulator'
|
||||||
|
|
||||||
export default function SimulatorPage() {
|
export default async function SimulatorPage() {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Simulator />
|
<Simulator />
|
||||||
|
|||||||
@ -15,6 +15,8 @@ import './globals.css'
|
|||||||
import '../styles/style.scss'
|
import '../styles/style.scss'
|
||||||
import '../styles/contents.scss'
|
import '../styles/contents.scss'
|
||||||
import Footer from '@/components/footer/Footer'
|
import Footer from '@/components/footer/Footer'
|
||||||
|
import { Suspense } from 'react'
|
||||||
|
import GlobalSpinner from '@/components/common/spinner/GlobalSpinner'
|
||||||
|
|
||||||
export const metadata = {
|
export const metadata = {
|
||||||
title: 'Create Next App',
|
title: 'Create Next App',
|
||||||
@ -64,22 +66,24 @@ export default async function RootLayout({ children }) {
|
|||||||
<GlobalDataProvider>
|
<GlobalDataProvider>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<body>
|
<body>
|
||||||
{headerPathname === '/login' || headerPathname === '/join' ? (
|
<Suspense fallback={<GlobalSpinner />}>
|
||||||
<QcastProvider>{children}</QcastProvider>
|
{headerPathname === '/login' || headerPathname === '/join' ? (
|
||||||
) : (
|
<QcastProvider>{children}</QcastProvider>
|
||||||
<QcastProvider>
|
) : (
|
||||||
<div className="wrap">
|
<QcastProvider>
|
||||||
<Header userSession={sessionProps} />
|
<div className="wrap">
|
||||||
<div className="content">
|
<Header userSession={sessionProps} />
|
||||||
<Dimmed />
|
<div className="content">
|
||||||
<SessionProvider useSession={sessionProps}>{children}</SessionProvider>
|
<Dimmed />
|
||||||
|
<SessionProvider useSession={sessionProps}>{children}</SessionProvider>
|
||||||
|
</div>
|
||||||
|
<Footer />
|
||||||
</div>
|
</div>
|
||||||
<Footer />
|
</QcastProvider>
|
||||||
</div>
|
)}
|
||||||
</QcastProvider>
|
<QModal />
|
||||||
)}
|
<PopupManager />
|
||||||
<QModal />
|
</Suspense>
|
||||||
<PopupManager />
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
</GlobalDataProvider>
|
</GlobalDataProvider>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user