Admin Layout

create an admin folder in app folder and then create a file named layout.tsx or layout.jsx.

and create a component for layout like

import React, { ReactNode } from 'react';

interface props{
    children:ReactNode;
}

const adminLayout = ({children}:props) => {
  return (
    <div className='flex'>        
        <aside className='bg-slate200 p5 mr-5'>Admin Sidebar</aside>
        <div>{children}</div>
    </div>
  )
}

export default adminLayout

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *