Skip to content

Commit 5456d5d

Browse files
authored
Fix/build and client error (#169)
2 parents 2b01d7f + 0cc42a5 commit 5456d5d

File tree

6 files changed

+20
-199
lines changed

6 files changed

+20
-199
lines changed

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ The following steps will get you up and running to contribute to `graz`:
4242
```
4343

4444
3. Setup all the dependencies and packages by running `pnpm`. This command will install dependencies and bootstrap the repo.
45-
> We are using `pnpm` as the default package manager, we suggest to you to do the same.
45+
> We are using `pnpm` as the default package manager, we suggest to you to do the same. pnpm version should be `9` or higher.
4646
4747
## Directory structure
4848

example/next/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"@emotion/styled": "^11.11.0",
1515
"@leapwallet/cosmos-social-login-capsule-provider-ui": "^0.0.58",
1616
"framer-motion": "^10.16.4",
17-
"graz": "*",
17+
"graz": "workspace:*",
1818
"next": "^13.4.19",
1919
"react": "^18.2.0",
2020
"react-dom": "^18.2.0",

example/starter/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"@leapwallet/cosmos-social-login-capsule-provider-ui": "^0.0.58",
1919
"bignumber.js": "^9.1.2",
2020
"framer-motion": "^10.16.4",
21-
"graz": "*",
21+
"graz": "workspace:*",
2222
"next": "^13.4.19",
2323
"react": "^18.2.0",
2424
"react-dom": "^18.2.0"

example/vite/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"preview": "vite preview"
1010
},
1111
"dependencies": {
12-
"graz": "*",
12+
"graz": "workspace:*",
1313
"react": "^18.2.0",
1414
"react-dom": "^18.2.0"
1515
},

packages/graz/src/provider/index.tsx

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { QueryClientProviderProps } from "@tanstack/react-query";
22
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
3-
import type { FC } from "react";
3+
import { type FC, useEffect } from "react";
44

55
import type { ConfigureGrazArgs } from "../actions/configure";
66
import { configureGraz } from "../actions/configure";
@@ -34,12 +34,14 @@ export type GrazProviderProps = Partial<QueryClientProviderProps> & {
3434
* @see https://tanstack.com/query
3535
*/
3636
export const GrazProvider: FC<GrazProviderProps> = ({ children, grazOptions, ...props }) => {
37-
configureGraz(grazOptions);
37+
useEffect(() => {
38+
configureGraz(grazOptions);
39+
}, []);
3840

3941
return (
4042
<QueryClientProvider key="graz-provider" client={queryClient} {...props}>
41-
{children}
4243
<ClientOnly>
44+
{children}
4345
<GrazEvents />
4446
</ClientOnly>
4547
</QueryClientProvider>

0 commit comments

Comments
 (0)