exchange page
This commit is contained in:
parent
263e9513b7
commit
344478c577
4 changed files with 22 additions and 15 deletions
|
|
@ -6,10 +6,8 @@ import {
|
|||
} from '@heroicons/react/24/outline';
|
||||
import { useEffect, useState } from 'react';
|
||||
import { ExchangesTable } from './components/ExchangesTable';
|
||||
import { useExchanges } from './hooks/useExchanges';
|
||||
|
||||
export function ExchangesPage() {
|
||||
const { syncExchanges } = useExchanges();
|
||||
const [syncing, setSyncing] = useState(false);
|
||||
const [syncStatus, setSyncStatus] = useState<{
|
||||
type: 'success' | 'error' | null;
|
||||
|
|
@ -31,18 +29,12 @@ export function ExchangesPage() {
|
|||
setSyncStatus({ type: null, message: '' });
|
||||
|
||||
try {
|
||||
const result = await syncExchanges();
|
||||
if (result) {
|
||||
setSyncStatus({
|
||||
type: 'success',
|
||||
message: `Exchange sync completed successfully! Job ID: ${result.jobId || 'Unknown'}`,
|
||||
});
|
||||
} else {
|
||||
setSyncStatus({
|
||||
type: 'error',
|
||||
message: 'Sync failed - no result returned from server',
|
||||
});
|
||||
}
|
||||
// TODO: Implement sync functionality
|
||||
await new Promise(resolve => setTimeout(resolve, 2000)); // Simulate sync
|
||||
setSyncStatus({
|
||||
type: 'success',
|
||||
message: 'Exchange sync functionality coming soon!',
|
||||
});
|
||||
} catch (error) {
|
||||
setSyncStatus({
|
||||
type: 'error',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue