-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
28 lines (27 loc) · 994 Bytes
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>01Founders Dashboard</title>
<script src="js/utils.js"></script>
<script src="js/services/baseAPI.js"></script>
<script src="js/services/auth.js"></script>
<script src="js/queries.js"></script>
<script>
// Wait for all scripts to load
window.addEventListener('load', () => {
const currentPath = window.location.pathname;
// Only redirect from login page if already authenticated
if (currentPath.endsWith('login.html') && AuthService.isAuthenticated()) {
window.location.replace('./dashboard.html');
}
// Only redirect to login if not on login page and not authenticated
else if (!currentPath.endsWith('login.html') && !AuthService.isAuthenticated()) {
window.location.replace('./login.html');
}
});
</script>
</head>
<body>
</body>
</html>