Skip to content

Commit

Permalink
fix updated spec params and add a comment for new useNavigate prop
Browse files Browse the repository at this point in the history
  • Loading branch information
jasong689 committed Oct 27, 2023
1 parent 3e75421 commit e7e8468
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gadgetinc/react",
"version": "0.14.13",
"version": "0.14.14",
"files": [
"README.md",
"dist/**/*"
Expand Down
16 changes: 10 additions & 6 deletions packages/react/spec/auth/useAuth.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,11 @@ describe("useAuth", () => {
test("returns the correct auth config when signed out", () => {
const { result, rerender } = renderHook(() => useAuth(), {
wrapper: MockClientWrapper(fullAuthApi, undefined, {
signInPath: "/foo-sign-in",
signOutActionApiIdentifier: "newSignOut",
redirectOnSuccessfulSignInPath: "/bar-signed-in",
auth: {
signInPath: "/foo-sign-in",
signOutActionApiIdentifier: "newSignOut",
redirectOnSuccessfulSignInPath: "/bar-signed-in",
},
}),
});

Expand All @@ -93,9 +95,11 @@ describe("useAuth", () => {
test("returns the correct auth config when signed in", () => {
const { result, rerender } = renderHook(() => useAuth(), {
wrapper: MockClientWrapper(fullAuthApi, undefined, {
signInPath: "/foo-sign-in",
signOutActionApiIdentifier: "newSignOut",
redirectOnSuccessfulSignInPath: "/bar-signed-in",
auth: {
signInPath: "/foo-sign-in",
signOutActionApiIdentifier: "newSignOut",
redirectOnSuccessfulSignInPath: "/bar-signed-in",
},
}),
});

Expand Down
1 change: 1 addition & 0 deletions packages/react/src/GadgetProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export const GadgetConfigurationContext = React.createContext<GadgetConfiguratio

interface BaseProviderProps {
children: ReactNode;
/** By default components/hooks will use `window.location` load new URLs. If you have your own routing provider, the `navigate` prop can be used to push new routes. */
navigate?: (path: string) => void;
}

Expand Down

0 comments on commit e7e8468

Please sign in to comment.