Skip to content

Commit d8ccfa7

Browse files
committed
yarn -> pnpm
1 parent dcd20da commit d8ccfa7

File tree

11 files changed

+29650
-23263
lines changed

11 files changed

+29650
-23263
lines changed
Lines changed: 33 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,40 @@
1-
'use client'
1+
"use client";
22

3-
import * as React from 'react'
4-
import { scaleLinear } from 'd3-scale'
3+
import * as React from "react";
4+
import { scaleLinear } from "d3-scale";
55
import {
66
ComposableMap,
77
Geographies,
88
Geography,
99
Marker,
1010
ZoomableGroup,
11-
} from 'react-simple-maps'
12-
import ReactTooltip from 'react-tooltip'
13-
import { CircularProgress } from '@mui/material'
14-
import { useTheme } from '@mui/material/styles'
15-
import { ApiState, CountryDataResponse } from '../typeDefs/explorer-api'
16-
import MAP_TOPOJSON from '../assets/world-110m.json'
11+
} from "react-simple-maps";
12+
import { Tooltip as ReactTooltip } from "react-tooltip";
13+
import { CircularProgress } from "@mui/material";
14+
import { useTheme } from "@mui/material/styles";
15+
import { ApiState, CountryDataResponse } from "../typeDefs/explorer-api";
16+
import MAP_TOPOJSON from "../assets/world-110m.json";
17+
18+
import "react-tooltip/dist/react-tooltip.css";
1719

1820
type MapProps = {
19-
userLocation?: [number, number]
20-
countryData?: ApiState<CountryDataResponse>
21-
loading: boolean
22-
}
21+
userLocation?: [number, number];
22+
countryData?: ApiState<CountryDataResponse>;
23+
loading: boolean;
24+
};
2325

2426
export const WorldMap: FCWithChildren<MapProps> = ({
2527
countryData,
2628
userLocation,
2729
loading,
2830
}) => {
29-
const { palette } = useTheme()
31+
const { palette } = useTheme();
3032

3133
const colorScale = React.useMemo(() => {
3234
if (countryData?.data) {
3335
const heighestNumberOfNodes = Math.max(
3436
...Object.values(countryData.data).map((country) => country.nodes)
35-
)
37+
);
3638
return scaleLinear<string, string>()
3739
.domain([
3840
0,
@@ -42,17 +44,17 @@ export const WorldMap: FCWithChildren<MapProps> = ({
4244
heighestNumberOfNodes,
4345
])
4446
.range(palette.nym.networkExplorer.map.fills)
45-
.unknown(palette.nym.networkExplorer.map.fills[0])
47+
.unknown(palette.nym.networkExplorer.map.fills[0]);
4648
}
47-
return () => palette.nym.networkExplorer.map.fills[0]
48-
}, [countryData, palette])
49+
return () => palette.nym.networkExplorer.map.fills[0];
50+
}, [countryData, palette]);
4951

5052
const [tooltipContent, setTooltipContent] = React.useState<string | null>(
5153
null
52-
)
54+
);
5355

5456
if (loading) {
55-
return <CircularProgress />
57+
return <CircularProgress />;
5658
}
5759

5860
return (
@@ -61,8 +63,8 @@ export const WorldMap: FCWithChildren<MapProps> = ({
6163
data-tip=""
6264
style={{
6365
backgroundColor: palette.nym.networkExplorer.background.tertiary,
64-
width: '100%',
65-
height: 'auto',
66+
width: "100%",
67+
height: "auto",
6668
}}
6769
viewBox="0, 50, 800, 350"
6870
projection="geoMercator"
@@ -75,7 +77,7 @@ export const WorldMap: FCWithChildren<MapProps> = ({
7577
<Geographies geography={MAP_TOPOJSON}>
7678
{({ geographies }) =>
7779
geographies.map((geo) => {
78-
const d = (countryData?.data || {})[geo.properties.ISO_A3]
80+
const d = (countryData?.data || {})[geo.properties.ISO_A3];
7981
return (
8082
<Geography
8183
key={geo.rsmKey}
@@ -84,25 +86,25 @@ export const WorldMap: FCWithChildren<MapProps> = ({
8486
stroke={palette.nym.networkExplorer.map.stroke}
8587
strokeWidth={0.2}
8688
onMouseEnter={() => {
87-
const { NAME_LONG } = geo.properties
89+
const { NAME_LONG } = geo.properties;
8890
if (!userLocation) {
89-
setTooltipContent(`${NAME_LONG} | ${d?.nodes || 0}`)
91+
setTooltipContent(`${NAME_LONG} | ${d?.nodes || 0}`);
9092
}
9193
}}
9294
onMouseLeave={() => {
93-
setTooltipContent('')
95+
setTooltipContent("");
9496
}}
9597
style={{
9698
hover:
9799
!userLocation && countryData
98100
? {
99101
fill: palette.nym.highlight,
100-
outline: 'white',
102+
outline: "white",
101103
}
102104
: undefined,
103105
}}
104106
/>
105-
)
107+
);
106108
})
107109
}
108110
</Geographies>
@@ -123,7 +125,7 @@ export const WorldMap: FCWithChildren<MapProps> = ({
123125
)}
124126
</ZoomableGroup>
125127
</ComposableMap>
126-
<ReactTooltip>{tooltipContent}</ReactTooltip>
128+
<ReactTooltip id="tooltip">{tooltipContent}</ReactTooltip>
127129
</>
128-
)
129-
}
130+
);
131+
};

explorer-nextjs/app/typings/react-tooltip.d.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

explorer-nextjs/package.json

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,31 @@
99
"lint": "next lint"
1010
},
1111
"dependencies": {
12-
"@nymproject/react": "^1.0.0",
12+
"@chain-registry/types": "^0.45.9",
13+
"@cosmos-kit/keplr-extension": "^2.12.2",
14+
"@cosmos-kit/react": "^2.17.2",
15+
"@mui/material": "^5.2.2",
16+
"@mui/x-data-grid": "7.1.1",
17+
"@mui/x-date-pickers": "7.1.1",
18+
"@nymproject/contract-clients": "1.2.4-rc.1",
1319
"@nymproject/nym-validator-client": "0.18.0",
20+
"@nymproject/react": "workspace:^1.0.0",
21+
"@types/d3-scale": "^4.0.8",
22+
"@types/react-simple-maps": "^3.0.4",
23+
"big.js": "^6.2.1",
24+
"chain-registry": "^1.63.12",
25+
"d3-scale": "^4.0.2",
26+
"i18n-iso-countries": "^7.11.2",
27+
"material-react-table": "^2.12.1",
1428
"next": "14.1.4",
1529
"react": "^18",
1630
"react-dom": "^18",
1731
"react-error-boundary": "^4.0.13",
18-
"material-react-table": "^2.12.1",
19-
"@mui/x-date-pickers": "7.1.1",
20-
"@mui/x-data-grid": "7.1.1"
32+
"react-simple-maps": "^3.0.0",
33+
"react-tooltip": "^5.27.0"
2134
},
2235
"devDependencies": {
36+
"@types/big.js": "^6.1.6",
2337
"@types/node": "^20",
2438
"@types/react": "^18",
2539
"@types/react-dom": "^18",

package.json

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -23,26 +23,26 @@
2323
"clean": "lerna run clean",
2424
"build": "run-s build:types build:packages",
2525
"build:wasm": "make sdk-wasm-build",
26-
"build:types": "lerna run --scope @nymproject/types build --stream",
26+
"build:types": "pnpm run --filter --stream @nymproject/types build ",
2727
"build:packages": "run-s build:packages:theme build:packages:react",
28-
"build:packages:theme": "lerna run --scope @nymproject/mui-theme build",
29-
"build:packages:react": "lerna run --scope @nymproject/react build",
30-
"build:react-example": "lerna run --scope @nymproject/react-webpack-with-theme-example build --stream",
31-
"build:playground": "lerna run --scope @nymproject/react storybook:build --stream",
32-
"build:ci:storybook": "yarn build && yarn dev:on && run-p build:react-example build:playground && yarn build:ci:storybook:collect-artifacts",
28+
"build:packages:theme": "pnpm run --filter @nymproject/mui-theme build",
29+
"build:packages:react": "pnpm run --filter @nymproject/react build",
30+
"build:react-example": "pnpm run --filter --stream @nymproject/react-webpack-with-theme-example build ",
31+
"build:playground": "pnpm run --filter --stream @nymproject/react storybook:build",
32+
"build:ci:storybook": "pnpm build && pnpm dev:on && run-p build:react-example build:playground && pnpm build:ci:storybook:collect-artifacts",
3333
"build:ci:storybook:collect-artifacts": "mkdir -p ts-packages/dist && mv sdk/typescript/packages/react-components/storybook-static ts-packages/dist/storybook && mv sdk/typescript/examples/react/mui-theme/dist ts-packages/dist/example",
34-
"prebuild:ci": "yarn dev:on && yarn",
34+
"prebuild:ci": "pnpm dev:on && pnpm",
3535
"build:ci": "run-s build:types build:packages build:wasm build:ci:sdk",
36-
"postbuild:ci": "yarn dev:off",
37-
"build:ci:sdk": "lerna run --scope '{@nymproject/sdk,@nymproject/node-tester,@nymproject/contract-clients,@nymproject/sdk-react,@nymproject/mix-fetch,@nymproject/nodejs-client,@nymproject/mix-fetch-node}' build --stream",
36+
"postbuild:ci": "pnpm dev:off",
37+
"build:ci:sdk": "pnpm run --fitler --stream '{@nymproject/sdk,@nymproject/node-tester,@nymproject/contract-clients,@nymproject/sdk-react,@nymproject/mix-fetch,@nymproject/nodejs-client,@nymproject/mix-fetch-node}' build",
3838
"docs:prod:build": "run-s docs:prod:build:ws",
39-
"docs:prod:build:ws": "lerna run docs:prod:build --stream",
39+
"docs:prod:build:ws": "pnpm run --stream docs:prod:build",
4040
"sdk:build": "./sdk/typescript/scripts/build-prod-sdk.sh",
4141
"sdk:publish": "./sdk/typescript/scripts/publish.sh",
42-
"lint": "lerna run lint --stream",
43-
"lint:fix": "lerna run lint:fix --stream",
44-
"tsc": "lerna run tsc --stream",
45-
"types:lint:fix": "lerna run lint:fix --scope @nymproject/types --scope @nymproject/nym-wallet-app",
42+
"lint": "pnpm run --stream lint",
43+
"lint:fix": "pnpm run --stream lint:fix",
44+
"tsc": "pnpm run --stream tsc",
45+
"types:lint:fix": "pnpm run lint:fix --filter @nymproject/types --filter @nymproject/nym-wallet-app",
4646
"audit:fix": "npm_config_yes=true npx yarn-audit-fix -- --dry-run",
4747
"dev:on": "node sdk/typescript/scripts/dev-mode-add.mjs",
4848
"dev:off": "node sdk/typescript/scripts/dev-mode-remove.mjs"
@@ -53,5 +53,6 @@
5353
"@npmcli/node-gyp": "^3.0.0",
5454
"node-gyp": "^9.3.1",
5555
"tslog": "3.3.3"
56-
}
56+
},
57+
"packageManager": "[email protected]+sha256.b6fd0bfda555e7e584ad7e56b30c68b01d5a04f9ee93989f4b93ca8473c49c74"
5758
}

0 commit comments

Comments
 (0)