Merge branch 'fix/redirect-error' into 'development'

[HOTFIX/FE] Fixing redirect issues

See merge request mbugroup/lti-web-client!91
This commit is contained in:
kris
2025-12-10 10:32:40 +00:00
2 changed files with 7 additions and 3 deletions
+1
View File
@@ -3,6 +3,7 @@ import type { NextConfig } from 'next';
const nextConfig: NextConfig = {
output: 'export',
images: { unoptimized: true },
trailingSlash: true,
};
export default nextConfig;
+6 -3
View File
@@ -1,5 +1,6 @@
'use client';
import { useEffect } from 'react';
import { usePathname, useRouter } from 'next/navigation';
import { useAuth } from '@/services/hooks/useAuth';
import { redirectToSSO } from '@/lib/auth-helper';
@@ -10,9 +11,11 @@ export default function Home() {
const router = useRouter();
const pathname = usePathname();
if (pathname === '/') {
router.replace('/dashboard');
}
useEffect(() => {
if (pathname === '/') {
router.replace('/dashboard');
}
}, [pathname]);
if (isLoadingUser) {
return (