fix: View mode canvas margin (#35619)

## Description

Removes the extra margin added in the View Mode when Navigation is as
Sidebar. It was noticed that the width of the sidebar was already
accounted for and was reduced from the available width unnecessarily

Fixes #35618

## Automation

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

### 🔍 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/10349675002>
> Commit: 9778e836c9c8b13e4f6f0971ff36407f452b5d08
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10349675002&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.IDE`
> Spec:
> <hr>Mon, 12 Aug 2024 10:18:59 UTC
<!-- end of auto-generated comment: Cypress test results  -->


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


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Improvements**
- Enhanced the auto-resizing behavior of the app's canvas by
streamlining the parameters used in the resizing hook, potentially
improving performance and user experience.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
Hetu Nandu 2024-08-12 20:45:30 +05:30 committed by GitHub
parent deaf9f9bea
commit 211dc11ffb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -34,7 +34,7 @@ export function AppPage(props: AppPageProps) {
}, [isAnvilLayout, canvasWidth]);
const pageViewWrapperRef = useRef<HTMLDivElement>(null);
useCanvasWidthAutoResize({ ref: pageViewWrapperRef, sidebarWidth });
useCanvasWidthAutoResize({ ref: pageViewWrapperRef });
useEffect(() => {
AnalyticsUtil.logEvent("PAGE_LOAD", {