From 2a7c1252756d488dc329214aed5c3e2e2fe5c571 Mon Sep 17 00:00:00 2001 From: KOSASIH Date: Sat, 24 Aug 2024 20:22:09 +0700 Subject: [PATCH] Create WalletContent.js --- app/components/WalletContent.js | 48 +++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 app/components/WalletContent.js diff --git a/app/components/WalletContent.js b/app/components/WalletContent.js new file mode 100644 index 0000000..ba16c66 --- /dev/null +++ b/app/components/WalletContent.js @@ -0,0 +1,48 @@ +import React, { useState, useEffect } from 'react'; +import { useWallet } from '../contexts/WalletContext'; +import { useTheme } from '../contexts/ThemeContext'; +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; +import { faPlus, faMinus } from '@fortawesome/free-solid-svg-icons'; +import WalletOverview from './WalletOverview'; +import WalletAccounts from './WalletAccounts'; +import WalletTransactions from './WalletTransactions'; + +const WalletContent = () => { + const [selectedTab, setSelectedTab] = useState('overview'); + const { wallet, accounts } = useWallet(); + const { theme } = useTheme(); + + useEffect(() => { + wallet.getWalletData(); + }, []); + + const handleTabSelect = (tab) => { + setSelectedTab(tab); + }; + + return ( +
+
+ + +
+ {selectedTab === 'overview' && } + {selectedTab === 'accounts' && } + {selectedTab === 'transactions' && } +
+ ); +}; + +export default WalletContent;