2024-01-07 17:00:24 +00:00
|
|
|
import { getGetServerSideProps } from '../../../api/ssrApollo'
|
|
|
|
import Layout from '../../../components/layout'
|
|
|
|
import styles from '../../../styles/wallet.module.css'
|
|
|
|
import { WalletCard } from '../../../components/wallet-card'
|
|
|
|
import { LightningAddressWalletCard } from './lightning-address'
|
2024-02-08 18:33:13 +00:00
|
|
|
import { LNbitsCard } from './lnbits'
|
|
|
|
import { NWCCard } from './nwc'
|
2024-02-13 19:17:56 +00:00
|
|
|
import { LNDCard } from './lnd'
|
|
|
|
import { WALLETS } from '../../../fragments/wallet'
|
|
|
|
import { useQuery } from '@apollo/client'
|
|
|
|
import PageLoading from '../../../components/page-loading'
|
2024-01-07 17:00:24 +00:00
|
|
|
|
2024-02-13 19:17:56 +00:00
|
|
|
export const getServerSideProps = getGetServerSideProps({ query: WALLETS, authRequired: true })
|
|
|
|
|
|
|
|
export default function Wallet ({ ssrData }) {
|
|
|
|
const { data } = useQuery(WALLETS)
|
|
|
|
|
|
|
|
if (!data && !ssrData) return <PageLoading />
|
|
|
|
const { wallets } = data || ssrData
|
|
|
|
const lnd = wallets.find(w => w.type === 'LND')
|
|
|
|
const lnaddr = wallets.find(w => w.type === 'LIGHTNING_ADDRESS')
|
2024-01-07 17:00:24 +00:00
|
|
|
|
|
|
|
return (
|
|
|
|
<Layout>
|
|
|
|
<div className='py-5 w-100'>
|
|
|
|
<h2 className='mb-2 text-center'>attach wallets</h2>
|
|
|
|
<h6 className='text-muted text-center'>attach wallets to supplement your SN wallet</h6>
|
|
|
|
<div className={styles.walletGrid}>
|
2024-02-13 19:17:56 +00:00
|
|
|
<LightningAddressWalletCard wallet={lnaddr} />
|
|
|
|
<LNDCard wallet={lnd} />
|
2024-02-08 18:33:13 +00:00
|
|
|
<LNbitsCard />
|
|
|
|
<NWCCard />
|
2024-01-07 17:00:24 +00:00
|
|
|
<WalletCard title='coming soon' badges={['probably']} />
|
|
|
|
<WalletCard title='coming soon' badges={['we hope']} />
|
|
|
|
<WalletCard title='coming soon' badges={['tm']} />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</Layout>
|
|
|
|
)
|
|
|
|
}
|