Skip to content

Commit

Permalink
add token to amplify context state and make param in api context prov…
Browse files Browse the repository at this point in the history
…ider
  • Loading branch information
dancingfrog committed Jul 23, 2024
1 parent 9e25fb8 commit 609a0be
Show file tree
Hide file tree
Showing 11 changed files with 183 additions and 21 deletions.
2 changes: 1 addition & 1 deletion R/README.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ format:
---

::: {.callout-tip}
_Note: This README file is generated from [`README.qmd`](R/README.qmd) in the "R" directory of this repo._
_Note: This README file is generated from [`README.qmd`](R/README.qmd) in the "R" directory of this repo with the command `npm run render:readme`._
:::

This is a set of React UI components, contexts, and services for any web application that is intended to interact with the [CORI Data API](https://github.com/ruralinnovation/cori-data-api) backend.
7 changes: 6 additions & 1 deletion inst/dist/@cori-risi/cotexts/AmplifyContextProvider.d.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
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: {
children?: ReactElement;
domain?: string;
region?: string;
identityPoolId?: string;
userPoolId?: string;
userPoolClientId?: string;
identityPoolId?: 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.

65 changes: 61 additions & 4 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.

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 @@ -14,6 +14,7 @@ export declare const ApiContext: React.Context<ApiContextType | null>;
export default function ApiContextProvider(props: {
children?: ReactElement;
baseURL?: string;
token?: string;
}): 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.

Loading

0 comments on commit 609a0be

Please sign in to comment.