mirror of
https://github.com/acid-info/logos-ordinals-dashboard.git
synced 2025-02-28 12:40:42 +00:00
feat: update dashboard
This commit is contained in:
parent
da3c5fc2d2
commit
ded74c076b
@ -68,18 +68,18 @@ const OperatorPanel: React.FC<OperatorPanelProps> = () => {
|
||||
</InfoRow>
|
||||
<InfoRow>
|
||||
<Label>Callsign</Label>
|
||||
<Value>RagingBull</Value>
|
||||
<Value></Value>
|
||||
<ActionButton onClick={handleEditCallsign}>
|
||||
<img src="/assets/edit.svg" alt="Edit callsign" />
|
||||
</ActionButton>
|
||||
</InfoRow>
|
||||
<InfoRow>
|
||||
<Label>Role</Label>
|
||||
<Value>Operator</Value>
|
||||
<Value>{user?.id && 'Operator'}</Value>
|
||||
</InfoRow>
|
||||
<InfoRow>
|
||||
<Label>OP Number</Label>
|
||||
<Value>#{user?.id}</Value>
|
||||
<Value>{user?.id && `#${user?.id}`}</Value>
|
||||
</InfoRow>
|
||||
</CallSignContainer>
|
||||
|
||||
|
@ -61,13 +61,13 @@ const ProgressBar: React.FC<ProgressBarProps> = ({
|
||||
<EarnedReward>
|
||||
<Label>Total Points</Label>
|
||||
<Value color="#F29AE9" backgroundColor="#320430">
|
||||
{`${numberWithCommas(user?.total_xp)}`}
|
||||
{`${numberWithCommas(user?.total_xp) || 0}`}
|
||||
</Value>
|
||||
</EarnedReward>
|
||||
<EarnedReward>
|
||||
<Label>Epoch 1 XP</Label>
|
||||
<Value color="#F29AE9" backgroundColor="#320430">
|
||||
{`${numberWithCommas(5020)}`}
|
||||
{`${numberWithCommas(0)}`}
|
||||
</Value>
|
||||
</EarnedReward>
|
||||
</PointsRow>
|
||||
|
@ -71,11 +71,7 @@ const HamburguerMenu = () => {
|
||||
{isOpen && (
|
||||
<HamburguerMenuContainer>
|
||||
<Navbar />
|
||||
<Link
|
||||
href="https://app.gitbook.com/o/JaXLyutHsCMnV7ROVSHw/s/Q0TLtn9WN6DR3Lzv4Gcs/logos-operators/pillars-and-contributions"
|
||||
passHref
|
||||
target="_blank"
|
||||
>
|
||||
<Link href="https://gitbook.logos.co/" passHref target="_blank">
|
||||
<GitbookButton>Gitbook</GitbookButton>
|
||||
</Link>
|
||||
</HamburguerMenuContainer>
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { truncateString } from '@/utils/general.utils'
|
||||
import { numberWithCommas, truncateString } from '@/utils/general.utils'
|
||||
import styled from '@emotion/styled'
|
||||
import { useAtom, useSetAtom } from 'jotai'
|
||||
import { useAtom } from 'jotai'
|
||||
import React, { useEffect, useRef, useState } from 'react'
|
||||
import { userInfoAtom } from '../../../atoms/userInfo'
|
||||
import { walletAddressAtom } from '../../../atoms/wallet'
|
||||
@ -22,7 +22,7 @@ const Dropdown: React.FC = () => {
|
||||
const [isExpanded, setIsExpanded] = useState(false)
|
||||
const [walletAddress, setWalletAddress] = useAtom(walletAddressAtom)
|
||||
|
||||
const setUserInfo = useSetAtom(userInfoAtom)
|
||||
const [userInfo, setUserInfo] = useAtom(userInfoAtom)
|
||||
|
||||
const walletHandlers = {
|
||||
okx: getOKXAddressAndSignature,
|
||||
@ -51,8 +51,11 @@ const Dropdown: React.FC = () => {
|
||||
sessionStorage.setItem('refreshToken', refresh)
|
||||
sessionStorage.setItem('walletAddress', address)
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Failed to connect or disconnect wallet:', error)
|
||||
} catch (error: any) {
|
||||
console.log('Failed to connect or disconnect wallet:', error)
|
||||
alert(error.message)
|
||||
|
||||
setWalletAddress(null)
|
||||
}
|
||||
}
|
||||
|
||||
@ -128,7 +131,9 @@ const Dropdown: React.FC = () => {
|
||||
</div>
|
||||
{walletAddress && (
|
||||
<PointsButton>
|
||||
<PointsValue>4,278 XP</PointsValue>
|
||||
<PointsValue>
|
||||
{`${numberWithCommas(userInfo?.total_xp) || 0}`} XP
|
||||
</PointsValue>
|
||||
</PointsButton>
|
||||
)}
|
||||
</DropdownHeader>
|
||||
|
@ -10,5 +10,6 @@ export const getUnisatAddressAndSignature = async () => {
|
||||
WALLET_SIGN_MESSAGE_REQUEST,
|
||||
'bip322-simple',
|
||||
)
|
||||
|
||||
return { addr, sig }
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user