Skip to content

Commit

Permalink
Implement the admin dashboard UI (sef-global#67)
Browse files Browse the repository at this point in the history
  • Loading branch information
kumuditha-udayanga authored Jan 6, 2024
1 parent 7f9d286 commit fbac897
Show file tree
Hide file tree
Showing 9 changed files with 154 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import Home from './components/Home/Home';
import MainLayout from './components/Layout/MainLayout';
import { UserContext, type UserContextType } from './contexts/UserContext';
import MentorRegistrationPage from './components/MentorRegistrationPage';
import Dashboard from './components/Dashboard/Dashboard.tsx';

const App: React.FC = () => {
const { user, getUser } = useContext(UserContext) as UserContextType;
Expand All @@ -25,6 +26,7 @@ const App: React.FC = () => {
path="/mentor-registration"
element={<MentorRegistrationPage />}
/>
<Route path="/dashboard/*" element={<Dashboard />} />
</Routes>
</MainLayout>
</BrowserRouter>
Expand Down
75 changes: 75 additions & 0 deletions src/components/Dashboard/Dashboard.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
import React from 'react';
import { Menu, Layout } from 'antd';

import { Link, Route, Routes } from 'react-router-dom';
import ManageMentorApplications from './scenes/ManageMentorApplications/ManageMentorApplications.tsx';
import ManageMentors from './scenes/ManageMentors/ManageMentors.tsx';
import OngoingMentorshipPrograms from './scenes/OngoingMentorshipPrograms/OngoingMentorshipPrograms.tsx';
import PlatformSettings from './scenes/PlatformSettings/PlatformSettings.tsx';
import MenteeApplications from './scenes/MenteeApplications/MenteeApplications.tsx';
import ManageUsers from './scenes/ManageUsers/ManageUsers.tsx';
import Emails from './scenes/Emails/Emails.tsx';

const { Content, Sider } = Layout;

const Dashboard: React.FC = () => {
return (
<Layout>
<Sider breakpoint="lg" collapsedWidth="0" width="250" theme="light">
<Menu mode="inline">
<Menu.Item key="1">
<Link to={`/dashboard/manage-mentors`}>Manage Mentors</Link>
</Menu.Item>
<Menu.Item key="2">
<Link to={`/dashboard/manage-mentor-application`}>
Manage Mentor Applications
</Link>
</Menu.Item>
<Menu.Item key="3">
<Link to={`/dashboard/mentee-applications`}>
Mentee Applications
</Link>
</Menu.Item>
<Menu.Item key="4">
<Link to={`/dashboard/ongoing-mentorship-programs`}>
Ongoing Mentorship Programs
</Link>
</Menu.Item>
<Menu.Item key="5">
<Link to={`/dashboard/platform-settings`}>Platform Settings</Link>
</Menu.Item>
<Menu.Item key="6">
<Link to={`/dashboard/manage-users`}>Manage Users</Link>
</Menu.Item>
<Menu.Item key="7">
<Link to={`/dashboard/emails`}>Emails</Link>
</Menu.Item>
</Menu>
</Sider>
<Layout>
<Content className="h-screen">
<Routes>
<Route path="/manage-mentors" element={<ManageMentors />} />
<Route
path="/manage-mentor-application"
element={<ManageMentorApplications />}
/>
<Route
path="/mentee-applications"
element={<MenteeApplications />}
/>
<Route
path="/ongoing-mentorship-programs"
element={<OngoingMentorshipPrograms />}
/>
<Route path="/platform-settings" element={<PlatformSettings />} />
<Route path="/manage-users" element={<ManageUsers />} />
<Route path="/emails" element={<Emails />} />
</Routes>
</Content>
</Layout>
</Layout>
);
};

export default Dashboard;
11 changes: 11 additions & 0 deletions src/components/Dashboard/scenes/Emails/Emails.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React from 'react';

const Emails: React.FC = () => {
return (
<div>
<h1>Emails</h1>
</div>
);
};

export default Emails;
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React from 'react';

const ManageMentorApplications: React.FC = () => {
return (
<div>
<h1>Manage Mentor Applications</h1>
</div>
);
};

export default ManageMentorApplications;
11 changes: 11 additions & 0 deletions src/components/Dashboard/scenes/ManageMentors/ManageMentors.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React from 'react';

const ManageMentors: React.FC = () => {
return (
<div>
<h1>Manage Mentors</h1>
</div>
);
};

export default ManageMentors;
11 changes: 11 additions & 0 deletions src/components/Dashboard/scenes/ManageUsers/ManageUsers.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React from 'react';

const ManageUsers: React.FC = () => {
return (
<div>
<h1>Manage Users</h1>
</div>
);
};

export default ManageUsers;
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React from 'react';

const MenteeApplications: React.FC = () => {
return (
<div>
<h1>Mentee Applications</h1>
</div>
);
};

export default MenteeApplications;
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React from 'react';

const OngoingMentorshipPrograms: React.FC = () => {
return (
<div>
<h1>Ongoing Mentorship Programs</h1>
</div>
);
};

export default OngoingMentorshipPrograms;
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React from 'react';

const PlatformSettings: React.FC = () => {
return (
<div>
<h1>Platform Settings</h1>
</div>
);
};

export default PlatformSettings;

0 comments on commit fbac897

Please sign in to comment.