+ )
+}
diff --git a/apps/dimentorin/src/app/(public)/mentoring/[id]/page.tsx b/apps/dimentorin/src/app/(public)/mentoring/[id]/page.tsx
new file mode 100644
index 0000000..3a97de1
--- /dev/null
+++ b/apps/dimentorin/src/app/(public)/mentoring/[id]/page.tsx
@@ -0,0 +1,45 @@
+import { FC } from 'react'
+import { ProfileSection } from './_components/sections/profile'
+import { StatisticsSection } from './_components/sections/senpai-statistics'
+import { TopicsSection } from './_components/sections/topics'
+import { ExperienceSection } from './_components/sections/experience'
+import { EducationSection } from './_components/sections/education'
+import { SenpaiScheduleSection } from './_components/sections/senpai-schedule'
+
+
+
+
+export const Components: FC = () => {
+ return (
+
+
+
+
+
+
+
+
+
+
+
+
Senpai Resume
+
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut et massa mi. Aliquam in hendrerit urna. Pellentesque sit amet sapien fringilla, mattis ligula consectetur, ultrices mauris. Maecenas vitae mattis tellus. Nullam quis imperdiet augue. Vestibulum auctor ornare leo, non suscipit magna interdum eu. Curabitur pellentesque nibh nibh, at maximus ante fermentum sit amet. Pellentesque commodo lacus at sodales sodales. Quisque sagittis orci ut diam condimentum, vel euismod erat placerat. In iaculis arcu eros, eget tempus orci facilisis id.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ )
+}
+
+export default Components
diff --git a/apps/dimentorin/src/app/(public)/mentoring/_components/mentor-card.tsx b/apps/dimentorin/src/app/(public)/mentoring/_components/mentor-card.tsx
index f557f26..6a108e0 100644
--- a/apps/dimentorin/src/app/(public)/mentoring/_components/mentor-card.tsx
+++ b/apps/dimentorin/src/app/(public)/mentoring/_components/mentor-card.tsx
@@ -1,5 +1,6 @@
import { Button } from '@imphnen-frontend-service/ui/atoms';
import { FC } from 'react';
+import { Link } from 'react-router-dom';
export const MentorCard: FC = () => {
return (
@@ -11,8 +12,10 @@ export const MentorCard: FC = () => {
-
- Fullname
+
+
+ Fullname
+
Full Stack Enjoyer at name company
diff --git a/apps/dimentorin/src/middleware.ts b/apps/dimentorin/src/middleware.ts
index 9dcb68e..e1c2f62 100644
--- a/apps/dimentorin/src/middleware.ts
+++ b/apps/dimentorin/src/middleware.ts
@@ -14,7 +14,6 @@ const mappingPublicRoutes = [
'/auth/register/otp',
'/auth/register/success',
'/auth/new-password',
- '/mentoring'
];
const mappingRoutePermissions = [
@@ -72,6 +71,10 @@ const mappingRoutePermissions = [
},
];
+const mappingPublicPrefixRoutes = [
+ '/mentoring',
+]
+
//TODO : Fix this later
// const redirectToFirstAccessibleRoute = (userPermissions: string[]) => {
// const fallback = mappingRoutePermissions.find((route) =>
@@ -88,6 +91,13 @@ export const middleware = async ({ request }: LoaderFunctionArgs) => {
const token = session_token?.token?.access_token;
const userPermissions =
session?.role?.permissions?.map?.((perm) => perm?.name) ?? [];
+
+ // Allow to access the landing page without authentication
+ // So, if the route prefix is in the mappingPublicPrefixRoutes, we return null
+ // to indicate that we don't need to authenticate the user
+ if (mappingPublicPrefixRoutes.some((prefix) => pathname.startsWith(prefix))) {
+ return null;
+ }
if (mappingPublicRoutes.includes(pathname)) {
if (token) return redirect('/dashboard');