Skip to content

Commit

Permalink
WIP: put the app sidebar to the logged out layout for all
Browse files Browse the repository at this point in the history
  • Loading branch information
vojtatranta committed Feb 5, 2025
1 parent 4667550 commit 398a375
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ReactNode, useRef, useState } from 'react';

import { ElevationContext, ElevationUp, NewModal } from '@trezor/components';
import { ElevationContext, ElevationDown, ElevationUp, NewModal } from '@trezor/components';

import { GuideButton, GuideRouter } from 'src/components/guide';
import { useLayoutSize } from 'src/hooks/suite';
Expand All @@ -19,6 +19,7 @@ import {
PageWrapper,
Wrapper,
} from './SuiteLayout/SuiteLayout';
import { LoggedOutSidebar } from './WelcomeLayout/WelcomeLayout';
import { ModalSwitcher } from '../modals/ModalSwitcher/ModalSwitcher';

interface LoggedOutLayout {
Expand Down Expand Up @@ -47,12 +48,16 @@ export const LoggedOutLayout = ({ children }: LoggedOutLayout) => {
<LayoutContext.Provider value={setLayoutPayload}>
<Body data-testid="@suite-layout/body">
<Columns>
<ElevationDown>
<LoggedOutSidebar />
</ElevationDown>
<AppWrapper
data-testid="@app"
ref={scrollRef}
id="layout-scroll"
>
{layoutHeader}

<ElevationUp>
<ContentWrapper>{children}</ContentWrapper>
</ElevationUp>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const WelcomeNavColumn = styled.div<{ $elevation: Elevation }>`
height: 100%;
`;

const Left = () => {
export const LoggedOutSidebar = () => {
const { elevation } = useElevation();

return (
Expand Down Expand Up @@ -130,7 +130,7 @@ export const WelcomeLayout = ({ children }: WelcomeLayoutProps) => {

<Row height="100%" width="100%" data-testid="@welcome-layout/body">
<ElevationDown>
<Left />
<LoggedOutSidebar />
</ElevationDown>

<Right>{children}</Right>
Expand Down

0 comments on commit 398a375

Please sign in to comment.