mirror of
https://github.com/dat515-2025/Group-8.git
synced 2026-03-22 15:12:08 +01:00
fix(frontend): implemented CSAS button responsiveness
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { useEffect, useMemo, useState, useCallback } from 'react';
|
||||
import { type Category, type Transaction, type BalancePoint, type User, getMe, deleteTransaction, getCategories, getTransactions, createTransaction, updateTransaction, getBalanceSeries } from '../api';
|
||||
import { type Category, type Transaction, type BalancePoint, getMe, deleteTransaction, getCategories, getTransactions, createTransaction, updateTransaction, getBalanceSeries } from '../api';
|
||||
import AccountPage from './AccountPage';
|
||||
import AppearancePage from './AppearancePage';
|
||||
import BalanceChart from './BalanceChart';
|
||||
@@ -119,14 +119,12 @@ export default function Dashboard({ onLogout }: { onLogout: () => void }) {
|
||||
const [isGenerating, setIsGenerating] = useState(false);
|
||||
|
||||
// Current user and CSAS connection status
|
||||
const [me, setMe] = useState<User | null>(null);
|
||||
const [csasConnected, setCsasConnected] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
(async () => {
|
||||
try {
|
||||
const u = await getMe();
|
||||
setMe(u);
|
||||
// Determine CSAS connection validity
|
||||
const csas = (u as any)?.config?.csas;
|
||||
let obj: any = null;
|
||||
|
||||
Reference in New Issue
Block a user