Skip to content

Commit

Permalink
add signin param to api context provider
Browse files Browse the repository at this point in the history
  • Loading branch information
dancingfrog committed Jul 23, 2024
1 parent 609a0be commit ebdfae0
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 11 deletions.
1 change: 0 additions & 1 deletion inst/dist/@cori-risi/cotexts/AmplifyContextProvider.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ export default function AmplifyContextProvider(props: {
userPoolClientId?: string;
fetchAuthSession: Function;
getCurrentUser: Function;
signOut?: Function;
}): React.JSX.Element;
export {};
//# sourceMappingURL=AmplifyContextProvider.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion inst/dist/@cori-risi/cotexts/AmplifyContextProvider.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion inst/dist/@cori-risi/cotexts/AmplifyContextProvider.js.map

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions inst/dist/@cori-risi/cotexts/ApiContextProvider.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export default function ApiContextProvider(props: {
children?: ReactElement;
baseURL?: string;
token?: string;
signOut?: Function;
}): React.JSX.Element;
export {};
//# sourceMappingURL=ApiContextProvider.d.ts.map
2 changes: 1 addition & 1 deletion inst/dist/@cori-risi/cotexts/ApiContextProvider.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion inst/dist/@cori-risi/cotexts/ApiContextProvider.js.map

Large diffs are not rendered by default.

6 changes: 2 additions & 4 deletions lib/@cori-risi/cotexts/AmplifyContextProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@ export default function AmplifyContextProvider(props: {
userPoolId?: string,
userPoolClientId?: string,
fetchAuthSession: Function,
getCurrentUser: Function,
signOut?: Function
getCurrentUser: Function
}) {

const [ state, setState ] = useState<AmplifyContextType | null>(initAmplifyContext);
Expand All @@ -80,8 +79,7 @@ export default function AmplifyContextProvider(props: {
userPoolId,
userPoolClientId,
fetchAuthSession,
getCurrentUser,
signOut
getCurrentUser
} = props;

// Ex. Auth data structure:
Expand Down
7 changes: 6 additions & 1 deletion lib/@cori-risi/cotexts/ApiContextProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,12 @@ export const ApiContext = createContext<ApiContextType | null>(initState);
// let hasAuthUser = false;
// let hasAuthClient = false;

export default function ApiContextProvider (props: { children?: ReactElement, baseURL?: string, token?: string }) {
export default function ApiContextProvider (props: {
children?: ReactElement,
baseURL?: string,
token?: string,
signOut?: Function
}) {

// const amplifyContext = useContext(AmplifyContext);
// const authenticator = useAuthenticator();
Expand Down

0 comments on commit ebdfae0

Please sign in to comment.