Skip to content

Commit

Permalink
Merge pull request #1 from Dprof-in-tech/main
Browse files Browse the repository at this point in the history
fix conflicts
  • Loading branch information
Dprof-in-tech authored Dec 22, 2024
2 parents 9f58240 + daaa514 commit dca4759
Show file tree
Hide file tree
Showing 100 changed files with 3,511 additions and 906 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
48 changes: 22 additions & 26 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';
import WithdrawAll from 'pages/spotnet/dashboard/withdraw-all/WithdrawAll';

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,17 +97,14 @@ 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 />} />
<Route path="/form" element={<Form />} />
<Route path="/documentation" element={<Documentation />} />
<Route path="/position-history" element={<PositionHistory />} />
<Route path="/stake" element={<Stake />} />
<Route path="/dashboard/withdraw-all" element={<WithdrawAll />} />
</Routes>
</main>
<Footer />
Expand Down
63 changes: 0 additions & 63 deletions frontend/src/components/BalanceCards.jsx

This file was deleted.

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.

Loading

0 comments on commit dca4759

Please sign in to comment.