Skip to content

Commit da6c534

Browse files
committed
Remove code redundancy
1 parent 3e5169b commit da6c534

File tree

9 files changed

+8
-492
lines changed

9 files changed

+8
-492
lines changed

front/src/App.tsx

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
1-
import { useState, useEffect } from 'react';
2-
import { BrowserRouter, Routes, Route, useNavigate, useRoutes } from 'react-router-dom';
1+
import { useEffect } from 'react';
2+
import { BrowserRouter, Routes, Route, useNavigate } from 'react-router-dom';
33
import './App.css';
4-
import { LoadingErrorState } from './components/common/LoadingErrorState';
54
import { WalletShowcase } from './components/WalletShowcase';
6-
import { useConfig } from './hooks/useConfig';
75
import { useWalletBalance } from './hooks/useWalletBalance';
86
import { useWalletTransactions } from './hooks/useWalletTransactions';
97
import { useWebSocketConnection } from './hooks/useWebSocketConnection';
108
import { getPublicRoutes, getProtectedRoutes, ROUTES } from './routes/routes';
119
import { WalletProvider, useWallet } from '../../hyle-wallet/src';
1210

1311
function AppContent() {
14-
const { isLoading: isLoadingConfig, error: configError } = useConfig();
1512
const { wallet, logout, stage, error } = useWallet();
1613
const navigate = useNavigate();
1714

@@ -43,14 +40,6 @@ function AppContent() {
4340
navigate(ROUTES.ROOT);
4441
};
4542

46-
if (isLoadingConfig) {
47-
return <LoadingErrorState isLoading={true} error={null} loadingMessage="Loading configuration..." />;
48-
}
49-
50-
if (configError) {
51-
return <LoadingErrorState isLoading={false} error={`Error loading configuration: ${configError}`} />;
52-
}
53-
5443
// If wallet is not connected, show the showcase screen
5544
if (!wallet) {
5645
return <WalletShowcase providers={['password', 'google', 'github']} />;

front/src/components/auth/CreateWallet.tsx

Lines changed: 0 additions & 177 deletions
This file was deleted.

front/src/components/auth/LoginWallet.tsx

Lines changed: 0 additions & 142 deletions
This file was deleted.

front/src/components/common/LoadingErrorState.tsx

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)