mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-11-06 23:30:28 +03:00
Revert to original code as we've moved the outlet context passing out and made more direct use of the ref
This commit is contained in:
parent
4293538dc3
commit
00ac8f654a
1 changed files with 1 additions and 3 deletions
|
|
@ -1,7 +1,6 @@
|
||||||
import React, { ComponentProps, MutableRefObject, ReactNode } from 'react';
|
import React, { ComponentProps, MutableRefObject, ReactNode } from 'react';
|
||||||
import { Box, Header, Line, Scroll, Text, as } from 'folds';
|
import { Box, Header, Line, Scroll, Text, as } from 'folds';
|
||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
import { Outlet, useOutletContext } from 'react-router-dom';
|
|
||||||
import { ContainerColor } from '../../styles/ContainerColor.css';
|
import { ContainerColor } from '../../styles/ContainerColor.css';
|
||||||
import * as css from './style.css';
|
import * as css from './style.css';
|
||||||
import { ScreenSize, useScreenSizeContext } from '../../hooks/useScreenSize';
|
import { ScreenSize, useScreenSizeContext } from '../../hooks/useScreenSize';
|
||||||
|
|
@ -13,7 +12,6 @@ type PageRootProps = {
|
||||||
|
|
||||||
export function PageRoot({ nav, children }: PageRootProps) {
|
export function PageRoot({ nav, children }: PageRootProps) {
|
||||||
const screenSize = useScreenSizeContext();
|
const screenSize = useScreenSizeContext();
|
||||||
const { iframeRef, backupIframeRef } = useOutletContext();
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Box grow="Yes" className={ContainerColor({ variant: 'Background' })}>
|
<Box grow="Yes" className={ContainerColor({ variant: 'Background' })}>
|
||||||
|
|
@ -21,7 +19,7 @@ export function PageRoot({ nav, children }: PageRootProps) {
|
||||||
{screenSize !== ScreenSize.Mobile && (
|
{screenSize !== ScreenSize.Mobile && (
|
||||||
<Line variant="Background" size="300" direction="Vertical" />
|
<Line variant="Background" size="300" direction="Vertical" />
|
||||||
)}
|
)}
|
||||||
<Outlet context={{ iframeRef, backupIframeRef }} />
|
{children}
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue