diff --git a/frontend/src/App.svelte b/frontend/src/App.svelte
index d29c2de..472acc5 100644
--- a/frontend/src/App.svelte
+++ b/frontend/src/App.svelte
@@ -15,7 +15,7 @@
-
- Login
+ Login
-
Register
diff --git a/frontend/src/LandingPage.svelte b/frontend/src/LandingPage.svelte
new file mode 100644
index 0000000..860094a
--- /dev/null
+++ b/frontend/src/LandingPage.svelte
@@ -0,0 +1,3 @@
+
+
+
\ No newline at end of file
diff --git a/frontend/src/Login.svelte b/frontend/src/Login.svelte
index 7dce089..1e579e1 100644
--- a/frontend/src/Login.svelte
+++ b/frontend/src/Login.svelte
@@ -7,20 +7,29 @@
let message = '';
async function login() {
+ console.log("test1")
try {
const response = await fetch('/api/login', {
method: 'POST',
+ credentials: "include",
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({ email, password })
});
- const data = await response.json();
+ console.log(response)
+
+ //const data = await response.json();
+ console.log("test.2")
if (response.ok) {
+ console.log("test2")
message = "Login successful!";
- navigate("/")
+
+ setTimeout(()=> {
+ window.location.href = "/api/redirect"
+ },2000)
// Optionally, set a token, redirect the user, or perform other actions
// For example: localStorage.setItem('token', data.token);
} else {
diff --git a/frontend/src/routes.js b/frontend/src/routes.js
index a38983e..838a504 100644
--- a/frontend/src/routes.js
+++ b/frontend/src/routes.js
@@ -2,9 +2,11 @@ import Login from './Login.svelte';
import Requests from './Requests.svelte';
import Register from "./Register.svelte";
import Request from "../Request.svelte";
+import LandingPage from "./LandingPage.svelte";
const routes = {
- '/': Login,
+ '/': LandingPage,
+ '/login': Login,
'/requests': Requests,
'/register': Register,
'/request': Request