PromucFlow_constructor/app/client/src/ce/hooks
sneha122 da8f726eb8
fix: New query button does not show up issue fixed (#36766)
## Description

This PR fixes two issues:
1. When importing older application jsons with applicationVersion 1,
they get redirected to `/applications` (older url) as opposed to `/app`
(newer slug based url). This results in new query button not showing up
on datasource view page, because new query button is hidden behind a
condition of editorType and editorType was depending on the new url
path. This PR fixes the issue by adding support for older path as well
to provide backwards compatibility.
2. Second similar issue was seen intermittently, when we do save and
authorise in REST API datasource, then sometimes the redirection was
happening to older url (/applications), in that case new query button
would not show up. This has been fixed too


Fixes #35626   
_or_  
Fixes `Issue URL`
> [!WARNING]  
> _If no issue exists, please create an issue first, and check with the
maintainers if the issue is valid._

## Automation

/ok-to-test tags="@tag.Sanity"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/11240765031>
> Commit: 015ef2a11ff65ec213dd36593b624ba268494325
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=11240765031&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Sanity`
> Spec:
> <hr>Tue, 08 Oct 2024 18:19:47 UTC
<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [x] No

Co-authored-by: “sneha122” <“sneha@appsmith.com”>
2024-10-09 13:22:27 +05:30
..
importModal chore: rename old ADS package (#35517) 2024-08-08 15:55:00 +03:00
datasourceEditorHooks.tsx chore: add blank line eslint rule (#36369) 2024-09-18 19:35:28 +03:00
hooks.test.ts fix: New query button does not show up issue fixed (#36766) 2024-10-09 13:22:27 +05:30
index.ts fix: New query button does not show up issue fixed (#36766) 2024-10-09 13:22:27 +05:30