'use client'
import { useEffect, useState } from 'react'
import { MobileLayout } from './MobileLayout'
import { DesktopLayout } from './DesktopLayout'
interface ResponsiveLayoutProps {
children: React.ReactNode
role?: 'creator' | 'agency' | 'brand'
showBottomNav?: boolean
}
export function ResponsiveLayout({
children,
role = 'creator',
showBottomNav = true,
}: ResponsiveLayoutProps) {
const [isMobile, setIsMobile] = useState(true)
useEffect(() => {
const checkMobile = () => {
setIsMobile(window.innerWidth < 1024)
}
checkMobile()
window.addEventListener('resize', checkMobile)
return () => window.removeEventListener('resize', checkMobile)
}, [])
if (isMobile) {
return (
{children}
)
}
return (
{children}
)
}
export default ResponsiveLayout