|
1 | 1 | 'use client'; |
2 | 2 |
|
3 | | -import React, { useState, useEffect } from 'react'; |
| 3 | +import React, { useState } from 'react'; |
4 | 4 | import VersionFetcher from './VersionFetcher'; |
5 | | -import { CopyButton } from '../CopyButton'; |
6 | 5 |
|
7 | | -interface VersionTableProps { |
8 | | - showGenesis?: boolean; |
9 | | -} |
10 | | - |
11 | | -const VersionTable: React.FC<VersionTableProps> = ({ showGenesis = true }) => { |
| 6 | +const VersionTable: React.FC = () => { |
12 | 7 | const [mainnetVersion, setMainnetVersion] = useState(''); |
13 | 8 | const [testnetVersion, setTestnetVersion] = useState(''); |
14 | 9 |
|
15 | | - useEffect(() => { |
16 | | - console.log('showGenesis prop:', showGenesis); |
17 | | - }, [showGenesis]); |
18 | | - |
19 | 10 | return ( |
20 | 11 | <> |
21 | 12 | <VersionFetcher chainId='pacific-1' rpcEndpoint='https://rpc.sei-apis.com' setVersion={setMainnetVersion} /> |
22 | | - <VersionFetcher chainId='atlantic-2' rpcEndpoint='https://rpc.atlantic-2.seinetwork.io' setVersion={setTestnetVersion} /> |
| 13 | + <VersionFetcher chainId='atlantic-2' rpcEndpoint='https://rpc-testnet.sei-apis.com/' setVersion={setTestnetVersion} /> |
23 | 14 |
|
24 | 15 | <table className='min-w-full divide-y divide-neutral-200 dark:divide-neutral-800'> |
25 | 16 | <thead className='bg-neutral-50 dark:bg-neutral-900/50'> |
26 | 17 | <tr> |
27 | 18 | <th className='px-4 py-3 text-left text-sm font-medium text-neutral-900 dark:text-neutral-100'>Network</th> |
28 | 19 | <th className='px-4 py-3 text-left text-sm font-medium text-neutral-900 dark:text-neutral-100'>Version</th> |
29 | 20 | <th className='px-4 py-3 text-left text-sm font-medium text-neutral-900 dark:text-neutral-100'>Chain ID</th> |
30 | | - {showGenesis && <th className='px-4 py-3 text-left text-sm font-medium text-neutral-900 dark:text-neutral-100'>Genesis File</th>} |
| 21 | + <th className='px-4 py-3 text-left text-sm font-medium text-neutral-900 dark:text-neutral-100'>EVM Chain ID</th> |
31 | 22 | </tr> |
32 | 23 | </thead> |
33 | 24 | <tbody className='divide-y divide-neutral-200 dark:divide-neutral-800 bg-neutral-50 dark:bg-neutral-900/30'> |
34 | 25 | <tr> |
35 | 26 | <td className='px-4 py-3 text-sm font-medium text-neutral-900 dark:text-neutral-100'>Mainnet</td> |
36 | 27 | <td className='px-4 py-3 text-sm text-neutral-600 dark:text-neutral-400'>{mainnetVersion || 'Fetching...'}</td> |
37 | 28 | <td className='px-4 py-3 text-sm text-neutral-600 dark:text-neutral-400'>pacific-1</td> |
38 | | - {showGenesis && ( |
39 | | - <td className='px-4 py-3 text-sm'> |
40 | | - <div className='inline-flex items-center space-x-2'> |
41 | | - <a |
42 | | - href='https://raw.githubusercontent.com/sei-protocol/testnet/refs/heads/main/pacific-1/genesis.json' |
43 | | - className='text-red-600 hover:text-red-800 dark:text-red-300 dark:hover:text-red-200 bg-red-50 hover:bg-red-100 dark:bg-red-900/20 dark:hover:bg-red-900/30 px-2 py-0.5 rounded'> |
44 | | - Genesis |
45 | | - </a> |
46 | | - <CopyButton textToCopy='https://raw.githubusercontent.com/sei-protocol/testnet/refs/heads/main/pacific-1/genesis.json' /> |
47 | | - </div> |
48 | | - </td> |
49 | | - )} |
| 29 | + <td className='px-4 py-3 text-sm text-neutral-600 dark:text-neutral-400'>1329</td> |
50 | 30 | </tr> |
51 | 31 |
|
52 | 32 | <tr> |
53 | 33 | <td className='px-4 py-3 text-sm font-medium text-neutral-900 dark:text-neutral-100'>Testnet</td> |
54 | 34 | <td className='px-4 py-3 text-sm text-neutral-600 dark:text-neutral-400'>{testnetVersion || 'Fetching...'}</td> |
55 | 35 | <td className='px-4 py-3 text-sm text-neutral-600 dark:text-neutral-400'>atlantic-2</td> |
56 | | - {showGenesis && ( |
57 | | - <td className='px-4 py-3 text-sm'> |
58 | | - <div className='inline-flex items-center space-x-2'> |
59 | | - <a |
60 | | - href='https://raw.githubusercontent.com/sei-protocol/testnet/refs/heads/main/atlantic-2/genesis.json' |
61 | | - className='text-red-600 hover:text-red-800 dark:text-red-300 dark:hover:text-red-200 bg-red-50 hover:bg-red-100 dark:bg-red-900/20 dark:hover:bg-red-900/30 px-2 py-0.5 rounded'> |
62 | | - Genesis |
63 | | - </a> |
64 | | - <CopyButton textToCopy='https://raw.githubusercontent.com/sei-protocol/testnet/refs/heads/main/atlantic-2/genesis.json' /> |
65 | | - </div> |
66 | | - </td> |
67 | | - )} |
| 36 | + <td className='px-4 py-3 text-sm text-neutral-600 dark:text-neutral-400'>1328</td> |
68 | 37 | </tr> |
69 | 38 | </tbody> |
70 | 39 | </table> |
|
0 commit comments