diff --git a/web/beacon-app/src/components/layout/AppLayout.tsx b/web/beacon-app/src/components/layout/AppLayout.tsx index 1a9324700..9d9c38356 100644 --- a/web/beacon-app/src/components/layout/AppLayout.tsx +++ b/web/beacon-app/src/components/layout/AppLayout.tsx @@ -6,6 +6,7 @@ import { PATH_DASHBOARD } from '@/application'; import { useFetchProfile } from '@/features/members/hooks/useFetchProfile'; import { isOnboardedMember } from '@/features/members/utils'; +// import SandboxBanner from './SanboxBanner/SandboxBanner'; import Topbar from './Topbar'; type PageProps = { @@ -28,6 +29,9 @@ function AppLayout({ children, Breadcrumbs }: PageProps) { return ( <> + {/* TODO: Display SandboxBanner only to user's with the sandbox account type. + + */} {children} diff --git a/web/beacon-app/src/components/layout/SanboxBanner/SandboxBanner.tsx b/web/beacon-app/src/components/layout/SanboxBanner/SandboxBanner.tsx new file mode 100644 index 000000000..d0510e3fc --- /dev/null +++ b/web/beacon-app/src/components/layout/SanboxBanner/SandboxBanner.tsx @@ -0,0 +1,28 @@ +import { Trans } from '@lingui/macro'; + +import { EXTERNAL_LINKS } from '@/application'; +import Alert from '@/components/common/Alert/Alert'; + +function SandboxBanner() { + return ( + +
+

+ + You are using the Ensign Sandbox. Ready to deploy your models to production? + +

+ + Upgrade + +
+
+ ); +} + +export default SandboxBanner; diff --git a/web/beacon-app/src/components/layout/SandboxLayout.tsx b/web/beacon-app/src/components/layout/SandboxLayout.tsx new file mode 100644 index 000000000..1fd02101b --- /dev/null +++ b/web/beacon-app/src/components/layout/SandboxLayout.tsx @@ -0,0 +1,18 @@ +import MobileFooter from './MobileFooter'; +import SandboxSidebar from './Sidebar/SandboxSidebar'; + +type SandboxLayoutProps = { + children?: React.ReactNode; +}; + +function SandboxLayout({ children }: SandboxLayoutProps) { + return ( +
+ +
{children}
+ +
+ ); +} + +export default SandboxLayout; diff --git a/web/beacon-app/src/components/layout/Topbar/Topbar.styles.ts b/web/beacon-app/src/components/layout/Topbar/Topbar.styles.ts deleted file mode 100644 index a04cf0925..000000000 --- a/web/beacon-app/src/components/layout/Topbar/Topbar.styles.ts +++ /dev/null @@ -1,9 +0,0 @@ -import styled from 'styled-components'; - -export const Header = styled.header` - position: absolute; - left: 0; - right: 0; - top: 0; - display: flex; -`; diff --git a/web/beacon-app/src/components/layout/Topbar/Topbar.tsx b/web/beacon-app/src/components/layout/Topbar/Topbar.tsx index 0b8a3a048..62e5783f6 100644 --- a/web/beacon-app/src/components/layout/Topbar/Topbar.tsx +++ b/web/beacon-app/src/components/layout/Topbar/Topbar.tsx @@ -1,8 +1,6 @@ -// import { Trans } from '@lingui/macro'; +import { Trans } from '@lingui/macro'; import { memo, ReactNode, useId, useState } from 'react'; -// import { EXTERNAL_LINKS } from '@/application'; -// import { EXTERNAL_LINKS } from '@/application'; import { ProfileCard } from '@/components/common/ProfileCard/ProfileCard'; import { MenuDropdownMenu } from '@/components/MenuDropdown/MenuDropdown'; import { useDropdownMenu } from '@/components/MenuDropdown/useDropdownMenu'; @@ -15,7 +13,6 @@ import { useOrgStore } from '@/store'; import ScheduleOfficeHours from '../../ScheduleOfficeHours/ScheduleOfficeHours'; import MobileNav from '../MobileNav/MobileNav'; import ProfileAvatar from '../ProfileAvatar/ProfileAvatar'; -import { Header } from './Topbar.styles'; type TopBarProps = { Breadcrumbs?: ReactNode; isOnboarded?: boolean; @@ -47,71 +44,54 @@ function Topbar({ Breadcrumbs: CustomBreadcrumbs, isOnboarded, profileData }: To }); return ( - <> -
- {/* TODO: Display alert banner when user is on the sandbox. */} - {/* -
-

- - You are using the Ensign Sandbox. Ready to deploy your models to production? - -

-
- - Upgrade - +
+
+ {isOnboarded ? ( + <> + {CustomBreadcrumbs ? ( + CustomBreadcrumbs + ) : ( + + {items.map((item) => ( + + {item} + + ))} + + )} +
+ + } + onOpenChange={onOpenChange} + isOpen={isOpen} + data-cy="menu-dropdown" + />
-
- */} -
- {isOnboarded ? ( - <> - {CustomBreadcrumbs ? ( - CustomBreadcrumbs - ) : ( - - {items.map((item) => ( - - {item} - - ))} - - )} -
- - } - onOpenChange={onOpenChange} - isOpen={isOpen} - data-cy="menu-dropdown" - /> -
- - ) : ( - <> - -
- - -
- - )} -
- {!isOnboarded && } -
- + + ) : ( + <> + +
+ + +
+ + )} + + {!isOnboarded && } + ); } diff --git a/web/beacon-app/src/constants/dashLayout.tsx b/web/beacon-app/src/constants/dashLayout.tsx index 04191293d..d716262ea 100644 --- a/web/beacon-app/src/constants/dashLayout.tsx +++ b/web/beacon-app/src/constants/dashLayout.tsx @@ -10,8 +10,9 @@ import { TbPlayFootball } from 'react-icons/tb'; import { EXTERNAL_LINKS, PATH_DASHBOARD } from '@/application'; import { MenuItem } from '@/types/MenuItem'; -export const SIDEBAR_WIDTH = 250; -export const TOPBAR_HEIGHT = 60; +/* TODO: Verify if styles are used and remove if not. */ +export const SIDEBAR_WIDTH = 0; +export const TOPBAR_HEIGHT = 0; export const menuItems: MenuItem[] = [ {