File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -74,6 +74,10 @@ body {
7474 overflow-y : auto;
7575}
7676
77+ body .viewer-route {
78+ overflow : hidden;
79+ }
80+
7781.phase-resolution-slider-wrapper {
7882 --ps-res-track-height : 0.85rem ;
7983 --ps-res-thumb-size : 0.9rem ;
Original file line number Diff line number Diff line change 1- import React from "react" ;
1+ import React , { useEffect } from "react" ;
22import { useLocation } from "react-router-dom" ;
33import clsx from "clsx" ;
44import TopBar from "../components/TopBar" ;
@@ -15,6 +15,18 @@ export const AppLayout: React.FC<AppLayoutProps> = ({ children }) => {
1515 location . pathname === basePath ||
1616 location . pathname === `${ basePath } /` ;
1717
18+ useEffect ( ( ) => {
19+ if ( isViewer ) {
20+ document . body . classList . add ( "viewer-route" ) ;
21+ } else {
22+ document . body . classList . remove ( "viewer-route" ) ;
23+ }
24+
25+ return ( ) => {
26+ document . body . classList . remove ( "viewer-route" ) ;
27+ } ;
28+ } , [ isViewer ] ) ;
29+
1830 const rootClass = clsx (
1931 // base shell
2032 "flex min-h-screen flex-col bg-slate-50 text-slate-900" ,
You can’t perform that action at this time.
0 commit comments