mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
chore: merge with dev
This commit is contained in:
parent
b678ac86e8
commit
3430cfdb3a
34 changed files with 3515 additions and 2600 deletions
|
|
@ -1,8 +1,10 @@
|
|||
'use client';
|
||||
import LeftMenu from '@components/Dashboard/UI/LeftMenu'
|
||||
import DashLeftMenu from '@components/Dashboard/UI/DashLeftMenu'
|
||||
import DashMobileMenu from '@components/Dashboard/UI/DashMobileMenu'
|
||||
import AdminAuthorization from '@components/Security/AdminAuthorization'
|
||||
import { SessionProvider } from 'next-auth/react'
|
||||
import React from 'react'
|
||||
import React, { useState, useEffect } from 'react'
|
||||
import { useMediaQuery } from 'usehooks-ts';
|
||||
|
||||
function ClientAdminLayout({
|
||||
children,
|
||||
|
|
@ -11,11 +13,17 @@ function ClientAdminLayout({
|
|||
children: React.ReactNode
|
||||
params: any
|
||||
}) {
|
||||
const isMobile = useMediaQuery('(max-width: 768px)')
|
||||
|
||||
return (
|
||||
<SessionProvider>
|
||||
<AdminAuthorization authorizationMode="page">
|
||||
<div className="flex">
|
||||
<LeftMenu />
|
||||
<div className="flex flex-col md:flex-row">
|
||||
{isMobile ? (
|
||||
<DashMobileMenu />
|
||||
) : (
|
||||
<DashLeftMenu />
|
||||
)}
|
||||
<div className="flex w-full">{children}</div>
|
||||
</div>
|
||||
</AdminAuthorization>
|
||||
|
|
@ -23,4 +31,4 @@ function ClientAdminLayout({
|
|||
)
|
||||
}
|
||||
|
||||
export default ClientAdminLayout
|
||||
export default ClientAdminLayout
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue