fix: Updating the pageId in the reconnect modal for Gsheets authorization (#26125)
## Description Updating `pageId` in the reconnect modal for Gsheets authorization. It was taking the `pageId` of the old delete page for authorization from the query params. This has been fixed by using props instead if its inside reconnect modal. #### PR fixes following issue(s) Fixes [#26024](https://github.com/appsmithorg/appsmith/issues/26024) #### Type of change - Bug fix (non-breaking change which fixes an issue) ## Testing #### How Has This Been Tested? - [x] Manual - [ ] Jest - [ ] Cypress ## Checklist: #### Dev activity - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [x] New and existing unit tests pass locally with my changes - [ ] PR is being merged under a feature flag #### QA activity: - [ ] [Speedbreak features](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#speedbreakers-) have been covered - [ ] Test plan covers all impacted features and [areas of interest](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#areas-of-interest-) - [ ] Test plan has been peer reviewed by project stakeholders and other QA members - [ ] Manually tested functionality on DP - [ ] We had an implementation alignment call with stakeholders post QA Round 2 - [ ] Cypress test cases have been added and approved by SDET/manual QA - [ ] Added `Test Plan Approved` label after Cypress tests were reviewed - [ ] Added `Test Plan Approved` label after JUnit tests were reviewed
This commit is contained in:
parent
69afe8dee2
commit
f4dc39ba6b
|
|
@ -136,7 +136,7 @@ function DatasourceAuth({
|
||||||
formData,
|
formData,
|
||||||
getSanitizedFormData,
|
getSanitizedFormData,
|
||||||
isInvalid,
|
isInvalid,
|
||||||
pageId: pageIdProp,
|
pageId: pageIdProp = "",
|
||||||
pluginType,
|
pluginType,
|
||||||
pluginName,
|
pluginName,
|
||||||
pluginPackageName,
|
pluginPackageName,
|
||||||
|
|
@ -174,7 +174,9 @@ function DatasourceAuth({
|
||||||
const { pageId: pageIdQuery } = useParams<ExplorerURLParams>();
|
const { pageId: pageIdQuery } = useParams<ExplorerURLParams>();
|
||||||
const history = useHistory<AppsmithLocationState>();
|
const history = useHistory<AppsmithLocationState>();
|
||||||
|
|
||||||
const pageId = (pageIdQuery || pageIdProp) as string;
|
const pageId = isInsideReconnectModal
|
||||||
|
? pageIdProp
|
||||||
|
: ((pageIdQuery || pageIdProp) as string);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (authType === AuthType.OAUTH2) {
|
if (authType === AuthType.OAUTH2) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user