-
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.
Merge pull request #39 from atlp-rwanda/187354203-ft-create-items-by-…
…seller Feature that enables sellers to create product
- Loading branch information
Showing
34 changed files
with
731 additions
and
220 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 |
---|---|---|
@@ -1,26 +1,33 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<link | ||
href="https://assets-global.website-files.com/6480f74670678239cc947755/6488d4417cfc510dd4a63f0a_favicon.png" | ||
rel="shortcut icon" | ||
type="image/x-icon" | ||
/> | ||
<link | ||
href="https://assets-global.website-files.com/6480f74670678239cc947755/6488d446646e7274f07e1744_webclip.png" | ||
rel="apple-touch-icon" | ||
/> | ||
<meta | ||
name="description" | ||
content="Welcome to the best E-Commerce in Rwanda. We offer best price, as well as delivery services. We are the best in this this country!" | ||
/> | ||
<link rel="preconnect" href="https://fonts.googleapis.com" /> | ||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin /> | ||
<link | ||
href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap" | ||
rel="stylesheet" | ||
/> | ||
|
||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<link href="https://assets-global.website-files.com/6480f74670678239cc947755/6488d4417cfc510dd4a63f0a_favicon.png" | ||
rel="shortcut icon" type="image/x-icon" /> | ||
<link href="https://assets-global.website-files.com/6480f74670678239cc947755/6488d446646e7274f07e1744_webclip.png" | ||
rel="apple-touch-icon" /> | ||
<meta name="description" | ||
content="Welcome to the best E-Commerce in Rwanda. We offer best price, as well as delivery services. We are the best in this this country!" /> | ||
<link rel="preconnect" href="https://fonts.googleapis.com"> | ||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> | ||
<link | ||
href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap" | ||
rel="stylesheet"> | ||
<title>Mavericks E-Commerce</title> | ||
</head> | ||
<title>Mavericks E-Commerce</title> | ||
</head> | ||
|
||
<body> | ||
<div id="root" class="relative"></div> | ||
<script type="module" src="/src/main.tsx"></script> | ||
</body> | ||
|
||
</html> | ||
<body> | ||
<div id="root" class="relative"></div> | ||
<script type="module" src="/src/main.tsx"></script> | ||
</body> | ||
</html> |
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
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
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,25 @@ | ||
import { Outlet } from 'react-router-dom'; | ||
import Sidebar from '../dashboard/Sidebar'; | ||
import { RxDashboard } from 'react-icons/rx'; | ||
import { FaCog, FaRegListAlt, FaUserFriends } from 'react-icons/fa'; | ||
import { FaRegEnvelope, FaUserTie } from 'react-icons/fa6'; | ||
|
||
export default function AdminLayout() { | ||
const adminSidebarLinks = [ | ||
{ name: 'Dashboard', path: '/admin', icon: <RxDashboard className='mr-3' /> }, | ||
{ name: 'Categories', path: 'categories', icon: <FaRegListAlt className='mr-3' /> }, | ||
{ name: 'Sellers', path: 'sellers', icon: <FaUserFriends className='mr-3' /> }, | ||
{ name: 'Buyers', path: 'buyers', icon: <FaUserTie className='mr-3' /> }, | ||
{ name: 'Messages', path: 'messages', icon: <FaRegEnvelope className='mr-3' /> }, | ||
{ name: 'Settings', path: 'settings', icon: <FaCog className='mr-3' /> }, | ||
]; | ||
|
||
return ( | ||
<> | ||
<div className='bg-[#D3E4DE] min-h-screen'> | ||
<Sidebar sidebarLinks={adminSidebarLinks} /> | ||
<Outlet /> | ||
</div> | ||
</> | ||
); | ||
} |
File renamed without changes.
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 was deleted.
Oops, something went wrong.
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,17 @@ | ||
import { Navigate } from 'react-router-dom'; | ||
import { useSelector } from 'react-redux'; | ||
import { RootState } from '../../redux/store'; | ||
import SellerLayout from '../seller/SellerLayout'; | ||
|
||
const RestrictedSellerRoute = ({ role }: { role: string }) => { | ||
const user = useSelector((state: RootState) => state.user); | ||
const isAuthenticated = useSelector((state: RootState) => state.user.token); | ||
|
||
if (!isAuthenticated && user.role !== role) { | ||
return <Navigate to='/' />; | ||
} | ||
|
||
return <SellerLayout />; | ||
}; | ||
|
||
export default RestrictedSellerRoute; |
Oops, something went wrong.