Skip to content

Commit

Permalink
Merge pull request #281 from us3r-network/scan-dev
Browse files Browse the repository at this point in the history
Scan dev merge back
  • Loading branch information
sin-bufan authored Dec 25, 2023
2 parents e6b46a2 + 06a6953 commit e8e8828
Show file tree
Hide file tree
Showing 7 changed files with 1,982 additions and 2,815 deletions.
31 changes: 17 additions & 14 deletions packages/client/scan/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@ceramicnetwork/common": "^2.20.0",
"@ceramicnetwork/http-client": "^2.22.0",
"@ceramicnetwork/stream-model": "^1.5.0",
"@ceramicnetwork/common": "^3.2.0",
"@ceramicnetwork/http-client": "^3.2.0",
"@ceramicnetwork/stream-model": "^2.2.0",
"@graphiql/plugin-explorer": "^0.1.15",
"@graphiql/toolkit": "^0.8.3",
"@monaco-editor/react": "^4.4.6",
Expand All @@ -22,10 +22,10 @@
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"@types/styled-components": "^5.1.26",
"@us3r-network/auth-with-rainbowkit": "^0.1.8",
"@us3r-network/data-model": "^0.2.1",
"@us3r-network/profile": "^0.4.2",
"axios": "^1.2.6",
"@us3r-network/auth-with-rainbowkit": "^0.2.1",
"@us3r-network/data-model": "^0.7.0",
"@us3r-network/profile": "^0.7.0",
"axios": "^1.6.2",
"dayjs": "^1.11.7",
"ethers": "^5.7.2",
"file-saver": "^2.0.5",
Expand All @@ -37,7 +37,11 @@
"monaco-editor": "^0.36.1",
"prismjs": "^1.29.0",
"react": "^18.2.0",
"react-aria-components": "^1.0.0-alpha.5",
"typescript": "^5.3.3",
"wagmi": "^1.4.10",
"viem": "^1.19.13",
"@rainbow-me/rainbowkit": "^1.3.0",
"react-aria-components": "^1.0.0",
"react-device-detect": "^2.2.2",
"react-dom": "^18.2.0",
"react-ga4": "^2.0.0",
Expand All @@ -48,13 +52,12 @@
"react-toastify": "^9.1.1",
"recharts": "^2.5.0",
"styled-components": "^5.3.6",
"typescript": "^4.4.2",
"use-url-search-params": "^2.5.1",
"web-vitals": "^2.1.0"
},
"devDependencies": {
"@composedb/devtools": "^0.5.0",
"@composedb/types": "^0.5.0",
"@composedb/devtools": "^0.6.1",
"@composedb/types": "^0.6.0",
"@craco/craco": "^7.0.0",
"@types/file-saver": "^2.0.5",
"assert": "^2.0.0",
Expand All @@ -63,9 +66,9 @@
"console-browserify": "^1.2.0",
"constants-browserify": "^1.0.0",
"crypto-browserify": "^3.12.0",
"did-session": "^2.0.0",
"dids": "^4.0.0",
"key-did-provider-ed25519": "^3.0.0",
"did-session": "^2.1.2",
"dids": "^4.0.4",
"key-did-provider-ed25519": "^3.0.2",
"key-did-resolver": "^3.0.0",
"node-polyfill-webpack-plugin": "^2.0.1",
"os-browserify": "^0.3.0",
Expand Down
3 changes: 1 addition & 2 deletions packages/client/scan/src/components/Dapp/Playground.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import { RuntimeCompositeDefinition } from '@composedb/types'

import 'graphiql/graphiql.css'
import '../../styles/playground.css'
import { useParams } from 'react-router-dom'
import { queryModelGraphql } from '../../api'
import { AxiosError } from 'axios'
import styled from 'styled-components'
Expand Down Expand Up @@ -158,7 +157,7 @@ export default function PlaygroundGraphiQL(
network === Network.MAINNET
? CERAMIC_MAINNET_HOST
: CERAMIC_TESTNET_HOST,
definition: definition as RuntimeCompositeDefinition,
definition: definition as unknown as RuntimeCompositeDefinition,
}),
[definition, network]
)
Expand Down
21 changes: 4 additions & 17 deletions packages/client/scan/src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,18 @@ import { useCeramicCtx } from '../context/CeramicCtx'
import ChevronDown from './icons/ChevronDown'
import { Network } from '../types'
import BackBtn from './BackBtn'
import { useLocation, useNavigate, useParams } from 'react-router-dom'
import { useLocation, useNavigate } from 'react-router-dom'
import { useMemo } from 'react'
import {
Button,
Item,
ListBoxItem,
Label,
ListBox,
Popover,
Select,
SelectValue,
} from 'react-aria-components'
import { isMobile } from 'react-device-detect'
import { useSession } from '@us3r-network/auth-with-rainbowkit'

export default function Header() {
const navigate = useNavigate()
Expand All @@ -30,17 +29,6 @@ export default function Header() {
return !show
}, [location])

const params = useParams()
const session = useSession()
const showLogoutButton = useMemo(() => {
return (
location.pathname.startsWith('/streams/profile') &&
session &&
session.id &&
session.id === params?.did
)
}, [location, session, params?.did])

if (isMobile) {
return null
}
Expand All @@ -61,7 +49,6 @@ export default function Header() {
/>
)) || <div></div>}
<NetworkSwitch />
{/* {showLogoutButton && <LogoutButton />} */}
</div>
</Box>
)
Expand All @@ -86,8 +73,8 @@ function NetworkSwitch() {
</Button>
<Popover>
<ListBox>
<Item id={Network.MAINNET}>{Network.MAINNET}</Item>
<Item id={Network.TESTNET}>{Network.TESTNET}</Item>
<ListBoxItem id={Network.MAINNET}>{Network.MAINNET}</ListBoxItem>
<ListBoxItem id={Network.TESTNET}>{Network.TESTNET}</ListBoxItem>
</ListBox>
</Popover>
</Select>
Expand Down
6 changes: 3 additions & 3 deletions packages/client/scan/src/components/Home/HomeFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useNavigate } from 'react-router-dom'
import styled from 'styled-components'
import {
Button,
Item,
ListBoxItem,
Label,
ListBox,
Popover,
Expand Down Expand Up @@ -55,8 +55,8 @@ export default function SearchFilter() {
</Button>
<Popover className={'home-popover'}>
<ListBox>
<Item id={'model'}>Model</Item>
<Item id={'stream'}>Stream</Item>
<ListBoxItem id={'model'}>Model</ListBoxItem>
<ListBoxItem id={'stream'}>Stream</ListBoxItem>
</ListBox>
</Popover>
</Select>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ export default function PlaygroundGraphiQL(
network === Network.MAINNET
? CERAMIC_MAINNET_HOST
: CERAMIC_TESTNET_HOST,
definition: definition as RuntimeCompositeDefinition,
definition: definition as unknown as RuntimeCompositeDefinition,
}),
[definition, network]
)
Expand Down
2 changes: 1 addition & 1 deletion packages/client/scan/src/styles/select.css
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
font-weight: bold;
}

.react-aria-Item {
.react-aria-ListBoxItem {
margin: 2px;
border-radius: 6px;
padding: 10px 15px;
Expand Down
Loading

0 comments on commit e8e8828

Please sign in to comment.