Skip to content

Commit

Permalink
Merge branch 'dev' into kjivani/provider-ui-bug
Browse files Browse the repository at this point in the history
  • Loading branch information
karan-leapwallet authored Sep 27, 2024
2 parents a2a386d + 5456d5d commit 056f629
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 199 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ The following steps will get you up and running to contribute to `graz`:
```

3. Setup all the dependencies and packages by running `pnpm`. This command will install dependencies and bootstrap the repo.
> We are using `pnpm` as the default package manager, we suggest to you to do the same.
> We are using `pnpm` as the default package manager, we suggest to you to do the same. pnpm version should be `9` or higher.

## Directory structure

Expand Down
2 changes: 1 addition & 1 deletion example/next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"@emotion/styled": "^11.11.0",
"@leapwallet/cosmos-social-login-capsule-provider-ui": "^0.0.58",
"framer-motion": "^10.16.4",
"graz": "*",
"graz": "workspace:*",
"next": "^13.4.19",
"react": "^18.2.0",
"react-dom": "^18.2.0",
Expand Down
2 changes: 1 addition & 1 deletion example/starter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"@leapwallet/cosmos-social-login-capsule-provider-ui": "^0.0.58",
"bignumber.js": "^9.1.2",
"framer-motion": "^10.16.4",
"graz": "*",
"graz": "workspace:*",
"next": "^13.4.19",
"react": "^18.2.0",
"react-dom": "^18.2.0"
Expand Down
2 changes: 1 addition & 1 deletion example/vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"preview": "vite preview"
},
"dependencies": {
"graz": "*",
"graz": "workspace:*",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
8 changes: 5 additions & 3 deletions packages/graz/src/provider/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { QueryClientProviderProps } from "@tanstack/react-query";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import type { FC } from "react";
import { type FC, useEffect } from "react";

import type { ConfigureGrazArgs } from "../actions/configure";
import { configureGraz } from "../actions/configure";
Expand Down Expand Up @@ -34,12 +34,14 @@ export type GrazProviderProps = Partial<QueryClientProviderProps> & {
* @see https://tanstack.com/query
*/
export const GrazProvider: FC<GrazProviderProps> = ({ children, grazOptions, ...props }) => {
configureGraz(grazOptions);
useEffect(() => {
configureGraz(grazOptions);
}, []);

return (
<QueryClientProvider key="graz-provider" client={queryClient} {...props}>
{children}
<ClientOnly>
{children}
<GrazEvents />
</ClientOnly>
</QueryClientProvider>
Expand Down
Loading

0 comments on commit 056f629

Please sign in to comment.