From b39e7b20c81e3668e7954b5f1c58013e693be440 Mon Sep 17 00:00:00 2001 From: andrewtan2000 Date: Tue, 27 Aug 2024 09:50:44 +0800 Subject: [PATCH] Placeholder for Genai page.tsx --- app/(main)/genai/page.tsx | 16 ++++++++++++++++ layout/AppMenu.tsx | 2 +- lib/RouteGuard.ts | 2 +- 3 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 app/(main)/genai/page.tsx diff --git a/app/(main)/genai/page.tsx b/app/(main)/genai/page.tsx new file mode 100644 index 0000000..074741d --- /dev/null +++ b/app/(main)/genai/page.tsx @@ -0,0 +1,16 @@ +'use client'; +import React from 'react'; + +const GenAi: React.FC = () => { + return ( +
+
+
+
GenAI
+
+
+
+ ); +}; + +export default GenAi; diff --git a/layout/AppMenu.tsx b/layout/AppMenu.tsx index 5b8255f..0b3bf72 100644 --- a/layout/AppMenu.tsx +++ b/layout/AppMenu.tsx @@ -50,7 +50,7 @@ const AppMenu = () => { }, { label: 'Google AI', - items: [{ label: 'Generate Question', icon: 'pi pi-fw pi-microchip-ai', to: '/questions/genai', visible: accessibleBy(['admin', 'tutor']) }], + items: [{ label: 'Generate Question', icon: 'pi pi-fw pi-microchip-ai', to: '/genai', visible: accessibleBy(['admin', 'tutor']) }], visible: accessibleBy(['admin', 'tutor']) } ]; diff --git a/lib/RouteGuard.ts b/lib/RouteGuard.ts index 2161d82..9706c8a 100644 --- a/lib/RouteGuard.ts +++ b/lib/RouteGuard.ts @@ -46,7 +46,7 @@ export const RouteGuard = { return this.accessibleBy(['admin', 'tutor']); case '/classes': return this.accessibleBy(['admin', 'tutor']); - case '/questions/genai': + case '/genai': return this.accessibleBy(['admin', 'tutor']); default: return false;