From 13ed1017d78587e11d69427407ad8a31ca56f9f5 Mon Sep 17 00:00:00 2001 From: Patrick_Pluto Date: Wed, 2 Oct 2024 09:07:25 +0200 Subject: [PATCH] fixes --- app/components/Login.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/components/Login.tsx b/app/components/Login.tsx index e2e8c32..a7a0030 100644 --- a/app/components/Login.tsx +++ b/app/components/Login.tsx @@ -2,6 +2,7 @@ import React, { useState, useEffect } from 'react'; import { createAccount, checkCredentials, + getData } from '../backend/database'; import Settings from './settings/Settings'; // Import the Settings component @@ -54,6 +55,10 @@ const Login: React.FC = () => { const success = await checkCredentials(accountName, password); if (success) { setIsLoggedIn(true); // Successful login + var data = await getData(accountName, password) + if (data) { + localStorage.setItem("dataFromServer", data) + } setShowLoginPopup(false); // Close the login popup } else { alert('Incorrect credentials');