From 9e60131de74b4b33aa38b44930f9d9efa4532b9a Mon Sep 17 00:00:00 2001 From: Bastien Chanot Date: Fri, 22 May 2026 03:10:51 +0200 Subject: [PATCH] fix(editor): hide footer on SVG editor, contain SVG to viewport Extract AppShell with useLocation to conditionally hide Footer on /svg-editor. Add max-height: 100% + width: auto to SVG canvas CSS so loaded SVGs fill available space without overflowing. Co-Authored-By: Claude Opus 4.6 (1M context) --- src/app/App.tsx | 33 ++++++++++++++++++++------------- src/styles/svg-editor.css | 2 ++ 2 files changed, 22 insertions(+), 13 deletions(-) diff --git a/src/app/App.tsx b/src/app/App.tsx index f738eee3..b36203c5 100644 --- a/src/app/App.tsx +++ b/src/app/App.tsx @@ -1,4 +1,4 @@ -import { BrowserRouter, Routes, Route } from 'react-router-dom' +import { BrowserRouter, Routes, Route, useLocation } from 'react-router-dom' import { ConfigProvider } from './providers/ConfigProvider' import Footer from '@/components/brand/Footer' import HomeRoute from './routes/HomeRoute' @@ -7,22 +7,29 @@ import EditorRoute from './routes/EditorRoute' import SvgEditorRoute from './routes/SvgEditorRoute' import NotFoundRoute from './routes/NotFoundRoute' +function AppShell() { + const hideFooter = useLocation().pathname === '/svg-editor' + return ( +
+
+ + } /> + } /> + } /> + } /> + } /> + +
+ {!hideFooter &&
} +
+ ) +} + export default function App() { return ( -
-
- - } /> - } /> - } /> - } /> - } /> - -
-
-
+
) diff --git a/src/styles/svg-editor.css b/src/styles/svg-editor.css index c1342422..2081be6f 100644 --- a/src/styles/svg-editor.css +++ b/src/styles/svg-editor.css @@ -25,6 +25,8 @@ .svg-editor-canvas-inner svg { display: block; max-width: 100%; + max-height: 100%; + width: auto; height: auto; }