Skip to content

Commit

Permalink
fix: build
Browse files Browse the repository at this point in the history
  • Loading branch information
yyyyaaa committed Jun 7, 2024
1 parent 9b73e47 commit 01141dc
Show file tree
Hide file tree
Showing 6 changed files with 91 additions and 83 deletions.
53 changes: 36 additions & 17 deletions examples/vote-proposal/components/common/Footer.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
import { Box, Link, Text, Icon, Stack, Divider, useColorModeValue } from '@interchain-ui/react';
import {
Box,
Link,
Text,
Icon,
Stack,
Divider,
useColorModeValue,
} from '@interchain-ui/react';
import { dependencies, products, Project } from '@/config';

function Product({ name, desc, link }: Project) {
Expand All @@ -18,21 +26,27 @@ function Product({ name, desc, link }: Project) {
hover: useColorModeValue('$purple600', '$purple300'),
},
boxShadow: {
base:
useColorModeValue(
'0 2px 5px #ccc',
'0 1px 3px #727272, 0 2px 12px -2px #2f2f2f'),
hover:
useColorModeValue(
'0 2px 5px #bca5e9',
'0 0 3px rgba(150, 75, 213, 0.8), 0 3px 8px -2px rgba(175, 89, 246, 0.9)')
base: useColorModeValue(
'0 2px 5px #ccc',
'0 1px 3px #727272, 0 2px 12px -2px #2f2f2f'
),
hover: useColorModeValue(
'0 2px 5px #bca5e9',
'0 0 3px rgba(150, 75, 213, 0.8), 0 3px 8px -2px rgba(175, 89, 246, 0.9)'
),
},
}}
>
<Text as="h2" fontSize="$xl" color="inherit" attributes={{ margin: 0 }}>
{name}&ensp;&rarr;
</Text>
<Text color="inherit" as="p" fontSize="$md" fontWeight="$normal" attributes={{ marginY: '$1' }}>
<Text
color="inherit"
as="p"
fontSize="$md"
fontWeight="$normal"
attributes={{ marginY: '$1' }}
>
{desc}
</Text>
</Stack>
Expand All @@ -57,10 +71,10 @@ function Dependency({ name, desc, link }: Project) {
borderRadius: '$xl',
boxShadow: {
base: 'none',
hover:
useColorModeValue(
'0 2px 5px #ccc',
'0 1px 3px #727272, 0 2px 12px -2px #2f2f2f'),
hover: useColorModeValue(
'0 2px 5px #ccc',
'0 1px 3px #727272, 0 2px 12px -2px #2f2f2f'
),
},
}}
>
Expand All @@ -72,7 +86,12 @@ function Dependency({ name, desc, link }: Project) {
</Box>

<Stack space="$2" direction="vertical">
<Text as="p" fontSize="$lg" fontWeight="$semibold" attributes={{ marginY: '$1' }}>
<Text
as="p"
fontSize="$lg"
fontWeight="$semibold"
attributes={{ marginY: '$1' }}
>
{name}
</Text>
<Text
Expand All @@ -82,7 +101,7 @@ function Dependency({ name, desc, link }: Project) {
attributes={{
color: useColorModeValue('$blackAlpha700', '$whiteAlpha700'),
lineHeight: '$short',
marginY: '$1'
marginY: '$1',
}}
>
{desc}
Expand Down Expand Up @@ -138,4 +157,4 @@ export function Footer() {
</Stack>
</>
);
}
}
14 changes: 11 additions & 3 deletions examples/vote-proposal/components/common/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
import { Link, Box, Button, Icon, Text, useTheme, useColorModeValue } from '@interchain-ui/react';
import {
Link,
Box,
Button,
Icon,
Text,
useTheme,
useColorModeValue,
} from '@interchain-ui/react';
import { dependencies } from '@/config';

const stacks = ['CosmosKit', 'Next.js'];
Expand All @@ -23,7 +31,7 @@ export function Header() {
}}
onClick={toggleColorMode}
>
<Icon name={useColorModeValue('moonLine', 'sunLine')}/>
<Icon name={useColorModeValue('moonLine', 'sunLine')} />
</Button>
</Box>

Expand Down Expand Up @@ -69,4 +77,4 @@ export function Header() {
</Box>
</>
);
}
}
2 changes: 1 addition & 1 deletion examples/vote-proposal/components/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export * from './common';
export * from './wallet';
export * from './voting';
export * from './voting';
10 changes: 5 additions & 5 deletions examples/vote-proposal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,17 @@
"interchain-query": "1.10.1",
"match-sorter": "^6.3.3",
"next": "^13",
"react": "18.2.0",
"react-dom": "18.2.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-icons": "4.6.0",
"react-markdown": "9.0.1",
"react-minimal-pie-chart": "^8.4.0"
},
"devDependencies": {
"@tanstack/react-query-devtools": "4.32.0",
"@types/node": "18.11.9",
"@types/react": "18.0.25",
"@types/react-dom": "18.0.9",
"@types/node": "^18.11.9",
"@types/react": "^18.0.25",
"@types/react-dom": "^18.0.9",
"eslint": "8.28.0",
"eslint-config-next": "13.0.5",
"generate-lockfile": "0.0.12",
Expand Down
13 changes: 5 additions & 8 deletions examples/vote-proposal/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import NoSSR from "react-no-ssr";
import { useState } from "react";
import { CHAIN_NAME, Layout, Voting, Wallet } from "@/components";
import { useState } from 'react';
import { ReactNoSSR } from '@interchain-ui/react-no-ssr';
import { CHAIN_NAME, Layout, Voting, Wallet } from '@/components';

export default function Home() {
const [chainName, setChainName] = useState(CHAIN_NAME);
Expand All @@ -11,13 +11,10 @@ export default function Home() {

return (
<Layout>
{/* TODO fix type error */}
{/* Type error: This JSX tag's 'children' prop expects a single child of type 'ReactNode', but multiple children were provided. */}
{/* @ts-ignore */}
<NoSSR>
<ReactNoSSR>
<Wallet chainName={chainName} onChainChange={onChainChange} />
<Voting chainName={chainName} />
</NoSSR>
</ReactNoSSR>
</Layout>
);
}
82 changes: 33 additions & 49 deletions examples/vote-proposal/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -701,9 +701,9 @@ __metadata:
"@interchain-ui/react-no-ssr": "npm:^0.1.2"
"@tanstack/react-query": "npm:4.32.0"
"@tanstack/react-query-devtools": "npm:4.32.0"
"@types/node": "npm:18.11.9"
"@types/react": "npm:18.0.25"
"@types/react-dom": "npm:18.0.9"
"@types/node": "npm:^18.11.9"
"@types/react": "npm:^18.0.25"
"@types/react-dom": "npm:^18.0.9"
bignumber.js: "npm:^9.1.1"
chain-registry: "npm:1.24.1"
cosmos-kit: "npm:2.8.6"
Expand All @@ -716,8 +716,8 @@ __metadata:
interchain-query: "npm:1.10.1"
match-sorter: "npm:^6.3.3"
next: "npm:^13"
react: "npm:18.2.0"
react-dom: "npm:18.2.0"
react: "npm:^18.2.0"
react-dom: "npm:^18.2.0"
react-icons: "npm:4.6.0"
react-markdown: "npm:9.0.1"
react-minimal-pie-chart: "npm:^8.4.0"
Expand Down Expand Up @@ -4464,13 +4464,6 @@ __metadata:
languageName: node
linkType: hard

"@types/node@npm:18.11.9":
version: 18.11.9
resolution: "@types/node@npm:18.11.9"
checksum: 10c0/aeaa925406f841c41679b32def9391a9892171e977105e025050e9f66e2830b4c50d0d974a1af0077ead3337a1f3bdf49ee7e7f402ebf2e034a3f97d9d240dba
languageName: node
linkType: hard

"@types/node@npm:>=13.7.0":
version: 20.12.4
resolution: "@types/node@npm:20.12.4"
Expand All @@ -4480,6 +4473,15 @@ __metadata:
languageName: node
linkType: hard

"@types/node@npm:^18.11.9":
version: 18.19.34
resolution: "@types/node@npm:18.19.34"
dependencies:
undici-types: "npm:~5.26.4"
checksum: 10c0/e985f50684def801801069e236165ee511f9195fc04ad4a2af7642d86aeaeaf7bfe34c147f894a48618a5c71c15b388ca91341a244792149543a712e38351988
languageName: node
linkType: hard

"@types/parse-json@npm:^4.0.0":
version: 4.0.2
resolution: "@types/parse-json@npm:4.0.2"
Expand All @@ -4494,16 +4496,16 @@ __metadata:
languageName: node
linkType: hard

"@types/react-dom@npm:18.0.9":
version: 18.0.9
resolution: "@types/react-dom@npm:18.0.9"
"@types/react-dom@npm:^18.0.9":
version: 18.3.0
resolution: "@types/react-dom@npm:18.3.0"
dependencies:
"@types/react": "npm:*"
checksum: 10c0/1c85b0889f15631132816fba93bf3aaa7b11cd0ce6f4a825d3c863a46b1b8d0b7fcdf03d7fcdf761f4a2e38312e5f26fc9b9ba34b486ee9f160477b9103625af
checksum: 10c0/6c90d2ed72c5a0e440d2c75d99287e4b5df3e7b011838cdc03ae5cd518ab52164d86990e73246b9d812eaf02ec351d74e3b4f5bd325bf341e13bf980392fd53b
languageName: node
linkType: hard

"@types/react@npm:*":
"@types/react@npm:*, @types/react@npm:^18.0.25":
version: 18.3.3
resolution: "@types/react@npm:18.3.3"
dependencies:
Expand All @@ -4513,24 +4515,6 @@ __metadata:
languageName: node
linkType: hard

"@types/react@npm:18.0.25":
version: 18.0.25
resolution: "@types/react@npm:18.0.25"
dependencies:
"@types/prop-types": "npm:*"
"@types/scheduler": "npm:*"
csstype: "npm:^3.0.2"
checksum: 10c0/5d30dbf46124a63ee832864bf38ce42de2e8924dc53470f14742343503a2cf1851b6b4f8b892ef661e1a670561f4c9052d782e419d314912e54626f3296e49b6
languageName: node
linkType: hard

"@types/scheduler@npm:*":
version: 0.23.0
resolution: "@types/scheduler@npm:0.23.0"
checksum: 10c0/5cf7f2ba3732b74877559eb20b19f95fcd0a20c17dcb20e75a7ca7c7369cd455aeb2d406b3ff5a38168a9750da3bad78dd20d96d11118468b78f4959b8e56090
languageName: node
linkType: hard

"@types/svg-path-parser@npm:^1.1.3":
version: 1.1.6
resolution: "@types/svg-path-parser@npm:1.1.6"
Expand Down Expand Up @@ -10175,15 +10159,15 @@ __metadata:
languageName: node
linkType: hard

"react-dom@npm:18.2.0":
version: 18.2.0
resolution: "react-dom@npm:18.2.0"
"react-dom@npm:^18.2.0":
version: 18.3.1
resolution: "react-dom@npm:18.3.1"
dependencies:
loose-envify: "npm:^1.1.0"
scheduler: "npm:^0.23.0"
scheduler: "npm:^0.23.2"
peerDependencies:
react: ^18.2.0
checksum: 10c0/66dfc5f93e13d0674e78ef41f92ed21dfb80f9c4ac4ac25a4b51046d41d4d2186abc915b897f69d3d0ebbffe6184e7c5876f2af26bfa956f179225d921be713a
react: ^18.3.1
checksum: 10c0/a752496c1941f958f2e8ac56239172296fcddce1365ce45222d04a1947e0cc5547df3e8447f855a81d6d39f008d7c32eab43db3712077f09e3f67c4874973e85
languageName: node
linkType: hard

Expand Down Expand Up @@ -10278,12 +10262,12 @@ __metadata:
languageName: node
linkType: hard

"react@npm:18.2.0":
version: 18.2.0
resolution: "react@npm:18.2.0"
"react@npm:^18.2.0":
version: 18.3.1
resolution: "react@npm:18.3.1"
dependencies:
loose-envify: "npm:^1.1.0"
checksum: 10c0/b562d9b569b0cb315e44b48099f7712283d93df36b19a39a67c254c6686479d3980b7f013dc931f4a5a3ae7645eae6386b4aa5eea933baa54ecd0f9acb0902b8
checksum: 10c0/283e8c5efcf37802c9d1ce767f302dd569dd97a70d9bb8c7be79a789b9902451e0d16334b05d73299b20f048cbc3c7d288bbbde10b701fa194e2089c237dbea3
languageName: node
linkType: hard

Expand Down Expand Up @@ -10579,12 +10563,12 @@ __metadata:
languageName: node
linkType: hard

"scheduler@npm:^0.23.0":
version: 0.23.0
resolution: "scheduler@npm:0.23.0"
"scheduler@npm:^0.23.2":
version: 0.23.2
resolution: "scheduler@npm:0.23.2"
dependencies:
loose-envify: "npm:^1.1.0"
checksum: 10c0/b777f7ca0115e6d93e126ac490dbd82642d14983b3079f58f35519d992fa46260be7d6e6cede433a92db70306310c6f5f06e144f0e40c484199e09c1f7be53dd
checksum: 10c0/26383305e249651d4c58e6705d5f8425f153211aef95f15161c151f7b8de885f24751b377e4a0b3dd42cce09aad3f87a61dab7636859c0d89b7daf1a1e2a5c78
languageName: node
linkType: hard

Expand Down

0 comments on commit 01141dc

Please sign in to comment.