start chatHistory

This commit is contained in:
YasinOnm08 2024-10-07 16:41:31 +02:00
parent a60cc7e941
commit 76da6aed0e
8 changed files with 89 additions and 38 deletions

View file

@ -2,7 +2,7 @@ import React, { useState, useEffect } from 'react';
import {
createAccount,
checkCredentials,
getData
getSettings
} from '../backend/database';
import Settings from './settings/Settings'; // Import the Settings component
@ -62,7 +62,7 @@ const Login: React.FC = () => {
const success = await checkCredentials(accountName, password);
if (success) {
setIsLoggedIn(true); // Successful login
const data = await getData(accountName, password)
const data = await getSettings(accountName, password)
if (data) {
if (typeof localStorage !== 'undefined') {
localStorage.setItem("dataFromServer", data)