created order page for admin panel
This commit is contained in:
parent
e32683637b
commit
fb33682226
1 changed files with 29 additions and 0 deletions
29
donutshop_ecommerce/src/app/orders/page.js
Normal file
29
donutshop_ecommerce/src/app/orders/page.js
Normal file
|
@ -0,0 +1,29 @@
|
|||
"use client"
|
||||
import React from 'react'
|
||||
import UserTab from '../../components/layout/UserTab'
|
||||
import useProfile from '../../components/UseProfile'
|
||||
|
||||
const OrderPage = () => {
|
||||
const {loading, data} = useProfile();
|
||||
|
||||
|
||||
|
||||
if(loading){
|
||||
return <p className='flex justify-center items-center'>Loading...</p>
|
||||
}
|
||||
if(!data.admin){
|
||||
return <p className='flex justify-center items-center'>Please login as an admin</p>
|
||||
}
|
||||
|
||||
|
||||
return (
|
||||
<div className='mb-10'>
|
||||
<UserTab isAdmin={true}/>
|
||||
<div className='px-5 max-w-md mx-auto mt-10'>
|
||||
<p>This order page for admin panel</p>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default OrderPage
|
Loading…
Add table
Reference in a new issue