-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
* feat: useAuthSignOutAction hook (aws-amplify#1209) * feat: useNavigateAction hook (aws-amplify#1213) * feat: adding useStateMutationHook (aws-amplify#1228) * feat: adding useStateMutationHook * feat: add data store action hooks (aws-amplify#1253) * chore: Action/Workflow hooks e2e tests (aws-amplify#1291) Co-authored-by: Chenwei Zhang <[email protected]>
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@aws-amplify/ui-react": patch | ||
--- | ||
|
||
feat: Add Action/Workflow hooks |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#amplify-do-not-edit-begin | ||
amplify/\#current-cloud-backend | ||
amplify/.config/local-* | ||
amplify/logs | ||
amplify/mock-data | ||
amplify/backend/amplify-meta.json | ||
amplify/backend/.temp | ||
build/ | ||
dist/ | ||
node_modules/ | ||
aws-exports.js | ||
awsconfiguration.json | ||
amplifyconfiguration.json | ||
amplifyconfiguration.dart | ||
amplify-build-config.json | ||
amplify-gradle-config.json | ||
amplifytools.xcconfig | ||
.secret-* | ||
**.sample | ||
#amplify-do-not-edit-end |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Action Hooks | ||
|
||
This backend is configured with Amplify Admin UI: | ||
|
||
- Authentication | ||
|
||
- `Email` is a required attribute, if not using a social provider to sign in | ||
- No screenshots are included as they contain secret IDs for the web apps | ||
|
||
## Using this Backend | ||
|
||
External contributors can re-create this backend by running: | ||
|
||
```shell | ||
amplify pull | ||
``` | ||
|
||
Internal (Amplify UI team) contributors can use this backend directly by running: | ||
|
||
- NOTE: do _not_ pass in the `--yes` flag, as that can sometimes cause issues with the CLI not recognizing certain existing environment variables | ||
|
||
```shell | ||
amplify pull --appId d1r9l08y32q5fb --envName dev | ||
``` |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"private": true, | ||
"name": "action-hooks", | ||
"version": "0.0.1", | ||
"scripts": { | ||
"pull": "amplify pull --appId d1r9l08y32q5fb --envName dev" | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { Button } from '@aws-amplify/ui-react'; | ||
import { useAuthSignOutAction } from '@aws-amplify/ui-react/internal'; | ||
|
||
export const AuthSignOutButton = ({ children }) => { | ||
const authSignOutAction = useAuthSignOutAction({ global: true }); | ||
return <Button onClick={authSignOutAction}>{children}</Button>; | ||
}; |