Skip to content

Commit a60baf7

Browse files
authored
feat: introduce Prediction Markets app page (DAP-4917, DAP-4924) (#63)
* fix: package.json script; crawler-backend env.ts * feat: add icon to the App page header * feat: adding Prediction Markets app page (DAP-4924) * Update extension-artifact-upload.yml * Update extension-release.yml
1 parent b6a251a commit a60baf7

File tree

11 files changed

+1341
-240
lines changed

11 files changed

+1341
-240
lines changed

.github/workflows/extension-artifact-upload.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- name: Install pnpm
1818
uses: pnpm/action-setup@v4
1919
with:
20-
version: 9.9.0
20+
version: 10.7.0
2121
- name: Reconfigure git to use HTTP authentication
2222
run: >
2323
git config --global url."https://github.com/".insteadOf

.github/workflows/extension-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- name: Install pnpm
2424
uses: pnpm/action-setup@v4
2525
with:
26-
version: 9.9.0
26+
version: 10.7.0
2727
- name: Reconfigure git to use HTTP authentication
2828
run: >
2929
git config --global url."https://github.com/".insteadOf

libs/engine/package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@
2929
"styled-components": "^5.3.6"
3030
},
3131
"peerDependencies": {
32-
"near-api-js": "2.1.3",
33-
"near-social-vm": "github:dapplets/near-social-vm",
3432
"react": "^18.2.0",
3533
"react-bootstrap": "^2.5.0",
3634
"react-dom": "^18.2.0",

libs/shared-components/package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"styled-components": "^5.3.6"
2222
},
2323
"peerDependencies": {
24+
"ethers": "^5.7.2",
2425
"react": "^18.2.0",
2526
"react-bootstrap": "^2.5.0",
2627
"react-dom": "^18.2.0",
@@ -30,13 +31,14 @@
3031
"@ant-design/icons": "5.5.1",
3132
"@codemirror/state": "^6.4.1",
3233
"@mweb/backend": "workspace:*",
33-
"@mweb/engine": "workspace:*",
3434
"@mweb/core": "workspace:*",
35-
"@mweb/react-engine": "workspace:*",
35+
"@mweb/engine": "workspace:*",
3636
"@mweb/react": "workspace:*",
37+
"@mweb/react-engine": "workspace:*",
3738
"@uiw/codemirror-extensions-langs": "^4.23.3",
3839
"@uiw/react-codemirror": "^4.23.3",
3940
"antd": "^5.18.3",
41+
"bs58": "^6.0.0",
4042
"classnames": "^2.5.1",
4143
"codemirror": "^6.0.1",
4244
"copy-to-clipboard": "^3.3.3",

libs/shared-components/src/mini-overlay/assets/icons/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import Home from './home'
1818
import Info from './info'
1919
import LoaderSettings from './loader-settings'
2020
import Bell from './bell'
21+
import LinkOut from './link-out'
2122

2223
export {
2324
MutationFallbackIcon,
@@ -34,6 +35,7 @@ export {
3435
OpenOverlay,
3536
OpenOverlayWithCircle,
3637
Logo,
38+
LinkOut,
3739
PersonAddAlt,
3840
Person,
3941
Home,
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import React from 'react'
2+
3+
const LinkOut = () => (
4+
<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
5+
<path
6+
d="M7.875 6.125L12.25 1.75M12.25 1.75H9.33333M12.25 1.75V4.66667M12.25 8.16667V11.0833C12.25 11.3928 12.1271 11.6895 11.9083 11.9083C11.6895 12.1271 11.3928 12.25 11.0833 12.25H2.91667C2.60725 12.25 2.3105 12.1271 2.09171 11.9083C1.87292 11.6895 1.75 11.3928 1.75 11.0833V2.91667C1.75 2.60725 1.87292 2.3105 2.09171 2.09171C2.3105 1.87292 2.60725 1.75 2.91667 1.75H5.83333"
7+
stroke="currentColor"
8+
strokeWidth="1.16667"
9+
strokeLinecap="round"
10+
strokeLinejoin="round"
11+
/>
12+
</svg>
13+
)
14+
15+
export default LinkOut

libs/shared-components/src/mini-overlay/components/page-layout.tsx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,14 @@ const Header = styled.div`
118118
align-items: center;
119119
gap: 10px;
120120
margin: 6px 10px 0 !important;
121+
122+
img {
123+
box-sizing: border-box;
124+
object-fit: cover;
125+
width: 24px;
126+
height: 24px;
127+
border-radius: 50%;
128+
}
121129
`
122130

123131
const HomeIcon = styled.div`
@@ -174,12 +182,13 @@ const H1 = styled.h1`
174182

175183
interface PageLayoutProps {
176184
title: string
185+
icon?: React.ReactNode
177186
children: React.ReactNode | null
178187
backPath?: string | -1
179188
}
180189

181190
const PageLayout = forwardRef<HTMLDivElement, PageLayoutProps>(
182-
({ title, children, backPath }, ref) => {
191+
({ title, icon, children, backPath }, ref) => {
183192
const navigate = useNavigate()
184193
return (
185194
<Container ref={ref} data-testid={`${title.toLowerCase()}-page`}>
@@ -193,6 +202,7 @@ const PageLayout = forwardRef<HTMLDivElement, PageLayoutProps>(
193202
<ArrowIcon />
194203
</BackButton>
195204
)}
205+
{icon ? icon : null}
196206
<H1>{title}</H1>
197207
</Header>
198208
{children}

0 commit comments

Comments
 (0)