Skip to content

Commit

Permalink
Merge pull request #416 from System625/cleanup
Browse files Browse the repository at this point in the history
Folder Structure and Naming Convention Refactoring
  • Loading branch information
djeck1432 authored Dec 21, 2024
2 parents 3e868e6 + a1d38d2 commit 804c7cc
Show file tree
Hide file tree
Showing 90 changed files with 2,802 additions and 641 deletions.
1 change: 1 addition & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
},
"devDependencies": {
"@babel/preset-env": "^7.26.0",
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
"@tanstack/eslint-plugin-query": "^5.60.1",
"@testing-library/jest-dom": "^6.6.2",
"@types/jest": "^29.5.14",
Expand Down
45 changes: 20 additions & 25 deletions frontend/src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,30 +1,29 @@
import React, { useState, useEffect } from 'react';
import { Routes, Route, Navigate, useNavigate } from 'react-router-dom';
import { Routes, Route, useNavigate } from 'react-router-dom';
import './globals.css';
import Header from './components/header/Header';
import Dashboard from 'pages/spotnet/dashboard/Dashboard';
import Footer from './components/Footer/Footer';
import SpotnetApp from 'pages/spotnet/spotnet_app/SpotnetApp';
import Login from 'pages/Login';
import Form from 'pages/forms/Form';
import Header from './components/layout/header/Header';
import Dashboard from './pages/dashboard/Dashboard';
import Footer from './components/layout/footer/Footer';
import SpotnetApp from './pages/spotnet-app/SpotnetApp';
import Form from './pages/form/Form';
import { createPortal } from 'react-dom';
import { logout } from 'services/wallet';
import { getTelegramUserWalletId } from 'services/telegram';
import Documentation from 'pages/spotnet/documentation/Documentation';
import Withdraw from 'pages/vault/withdraw/Withdraw';
import { useWalletStore } from 'stores/useWalletStore';
import { Notifier, notify } from 'components/Notifier/Notifier';
import { useConnectWallet } from 'hooks/useConnectWallet';
import OverviewPage from 'pages/spotnet/overview/Overview';
import { ActionModal } from 'components/ui/ActionModal';
import Stake from 'pages/vault/stake/Stake';
import { TELEGRAM_BOT_LINK } from 'utils/constants';
import { useCheckMobile } from 'hooks/useCheckMobile';
import PositionHistory from 'pages/spotnet/position_history/PositionHistory';
import { logout } from './services/wallet';
import { getTelegramUserWalletId } from './services/telegram';
import Documentation from './pages/documentation/Documentation';
import Withdraw from './pages/withdraw/Withdraw';
import { useWalletStore } from './stores/useWalletStore';
import { Notifier, notify } from './components/layout/notifier/Notifier';
import { useConnectWallet } from './hooks/useConnectWallet';
import OverviewPage from './pages/overview/Overview';
import { ActionModal } from './components/ui/action-modal';
import Stake from './pages/stake/Stake';
import { TELEGRAM_BOT_LINK } from './utils/constants';
import { useCheckMobile } from './hooks/useCheckMobile';
import PositionHistory from './pages/position-history/PositionHistory';


function App() {
const { walletId, setWalletId, removeWalletId } = useWalletStore();
const { setWalletId, removeWalletId } = useWalletStore();
const [showModal, setShowModal] = useState(false);
const navigate = useNavigate();
const [isMobileRestrictionModalOpen, setisMobileRestrictionModalOpen] = useState(true);
Expand Down Expand Up @@ -98,10 +97,6 @@ function App() {
<main>
<Routes>
<Route index element={<SpotnetApp onConnectWallet={handleConnectWallet} onLogout={handleLogout} />} />
<Route
path="/login"
element={walletId ? <Navigate to="/" /> : <Login onConnectWallet={handleConnectWallet} />}
/>
<Route path="/dashboard" element={<Dashboard telegramId={window?.Telegram?.WebApp?.initData?.user?.id} />} />
<Route path="/withdraw" element={<Withdraw />} />
<Route path="/overview" element={<OverviewPage />} />
Expand Down
10 changes: 0 additions & 10 deletions frontend/src/components/CardGradients.jsx

This file was deleted.

38 changes: 0 additions & 38 deletions frontend/src/components/Dashboard/DashboardCard.jsx

This file was deleted.

195 changes: 0 additions & 195 deletions frontend/src/components/LendingForm.js

This file was deleted.

15 changes: 0 additions & 15 deletions frontend/src/components/Login.js

This file was deleted.

Loading

0 comments on commit 804c7cc

Please sign in to comment.