Skip to content

Commit

Permalink
feat: settings general api
Browse files Browse the repository at this point in the history
  • Loading branch information
leduyhien152 committed Dec 21, 2023
1 parent e88fe33 commit bc12587
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 23 deletions.
23 changes: 22 additions & 1 deletion apps/mochi-web/pages/tip-network.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { HOME_URL } from '~envs'
import { SEO } from '~app/layout/seo'
import { API } from '~constants/api'
import dynamic from 'next/dynamic'
import { TransactionGraphData, TransactionEdge } from '~types/mochi-schema'
import { GraphData, NodeObject } from 'react-force-graph-2d'
import { useMemo, useState } from 'react'
import { ProfileBar } from '~components/TipNetwork/ProfileBar'
Expand All @@ -18,6 +17,28 @@ import {
TipNetworkData,
} from '~types/tip-graph'
import { useDisclosure } from '@dwarvesf/react-hooks'
import { Profile } from '@consolelabs/mochi-rest'

export interface TransactionNode {
profile_id: string
total_volume: number
spend_volume: number
receive_volume: number
profile: Profile
}

export interface TransactionEdge {
from_profile_id: string
to_profile_id: string
total_volume: number
spend: number
receive: number
}

export interface TransactionGraphData {
nodes: TransactionNode[]
edges: TransactionEdge[]
}

const TipNetworkGraph = dynamic(
() =>
Expand Down
22 changes: 0 additions & 22 deletions apps/mochi-web/types/mochi-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
* ---------------------------------------------------------------
*/

import { Profile } from '@consolelabs/mochi-rest'
export interface ModelActivity {
guild_default?: boolean
id?: number
Expand Down Expand Up @@ -2537,24 +2536,3 @@ export interface UuidNullUUID {
/** Valid is true if UUID is not NULL */
valid?: boolean
}

export interface TransactionNode {
profile_id: string
total_volume: number
spend_volume: number
receive_volume: number
profile: Profile
}

export interface TransactionEdge {
from_profile_id: string
to_profile_id: string
total_volume: number
spend: number
receive: number
}

export interface TransactionGraphData {
nodes: TransactionNode[]
edges: TransactionEdge[]
}

0 comments on commit bc12587

Please sign in to comment.