Skip to content

Commit

Permalink
move session update logic 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 abf69f5 commit d276b94
Show file tree
Hide file tree
Showing 10 changed files with 471 additions and 495 deletions.
4 changes: 0 additions & 4 deletions inst/dist/@cori-risi/cotexts/AmplifyContextProvider.d.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import React, { ReactElement } from "react";
import { JWT } from "@aws-amplify/auth";
type AmplifyContextType = {
domain?: string;
region?: string;
identityPoolId?: string;
userPoolId?: string;
userPoolClientId?: string;
token: JWT | null;
};
export declare const AmplifyContext: React.Context<AmplifyContextType | null>;
export default function AmplifyContextProvider(props: {
Expand All @@ -16,8 +14,6 @@ export default function AmplifyContextProvider(props: {
identityPoolId?: string;
userPoolId?: string;
userPoolClientId?: string;
fetchAuthSession: Function;
getCurrentUser: 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.

160 changes: 87 additions & 73 deletions 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.

5 changes: 4 additions & 1 deletion inst/dist/@cori-risi/cotexts/ApiContextProvider.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ import React, { ReactElement } from "react";
import { AxiosInstance } from 'axios';
import { JWT } from "@aws-amplify/auth";
import "./styles/ApiContextProvider.css";
import { User } from "../models";
interface ApiContextType {
apiClient: AxiosInstance;
authenticated: boolean;
authenticated_user: User | null;
baseURL: string;
token: JWT | null;
data: any;
Expand All @@ -14,7 +16,8 @@ export declare const ApiContext: React.Context<ApiContextType | null>;
export default function ApiContextProvider(props: {
children?: ReactElement;
baseURL?: string;
token?: JWT;
fetchAuthSession?: Function;
getCurrentUser?: Function;
signOut?: Function;
}): React.JSX.Element;
export {};
Expand Down
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.

Loading

0 comments on commit d276b94

Please sign in to comment.