-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update to the vendor application feature
- Loading branch information
1 parent
db5e2b9
commit fcc86f1
Showing
21 changed files
with
203 additions
and
332 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { Button } from '@/components/ui/button' | ||
import Link from 'next/link' | ||
import React from 'react' | ||
|
||
const AuthorizationError = () => { | ||
return ( | ||
<div className='w-full h-screen flex flex-col justify-center items-center space-y-4'> | ||
<div className='text-center'> | ||
<h1 className='tracking-tight font-semibold'>You are not authorized to access this page yet!</h1> | ||
<p className='text-sm text-secondary-200'>Please login as an admin or check if your vendor application is accepted</p> | ||
</div> | ||
|
||
<Link href={"/dashboard"}><Button variant={"ghost"} className='bg-secondary-green-60 hover:bg-secondary-green-50 rounded-full text-white hover:text-white'>Go to Home</Button></Link> | ||
</div> | ||
) | ||
} | ||
|
||
export default AuthorizationError |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import React from 'react' | ||
|
||
const OrdersPage = () => { | ||
return ( | ||
<div>OrdersPage</div> | ||
) | ||
} | ||
|
||
export default OrdersPage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import React from 'react' | ||
|
||
const ManageVendors = () => { | ||
return ( | ||
<div className='space-y-10'> | ||
<div> | ||
<h1 className='text-xl tracking-tighter font-semibold'>Manage your products</h1> | ||
<p className='text-sm text-secondary'>You can edit or delete your products</p> | ||
</div> | ||
|
||
|
||
</div> | ||
) | ||
} | ||
|
||
export default ManageVendors |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
"use server" | ||
|
||
import { cookies } from "next/headers" | ||
|
||
export const userIsAuthorized = async () => { | ||
const cookieStore = await cookies() | ||
|
||
const isAdmin = cookieStore.get("isAdmin") | ||
const isVendor = cookieStore.get("vendorId") | ||
|
||
if (isAdmin || isVendor) { | ||
return true | ||
} | ||
|
||
return false | ||
} |
Oops, something went wrong.