Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re org #156

Draft
wants to merge 19 commits into
base: develop
Choose a base branch
from
15 changes: 9 additions & 6 deletions src/app/App.tsx → src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,22 @@
// all our context providers won't work server side, beacuse React.Context is client side
'use client';

import { ApolloProvider } from '@/app/hooks/ApolloProvider';
import { AppProvider } from '@/app/hooks/AppProvider';
import { AuthProvider } from '@/app/hooks/AuthProvider';
import GlobalLoaderProvider, { loaderPortalRef } from '@/app/hooks/GlobalLoaderProvider';
import ThemeProvider from '@/app/hooks/ThemeProvider';
import ToastProvider from '@/app/hooks/ToastProvider';
import { css } from '@/lib/emotion';
import { loadDevMessages, loadErrorMessages } from '@apollo/client/dev';
import { ReactNode, forwardRef } from 'react';
import { QueryClient, QueryClientProvider } from 'react-query';
import Footer from './components/Footer';
import Header from './components/Header';
import { modalPortalRef } from './components/Modal';
import {
ApolloProvider,
AppProvider,
AuthProvider,
GlobalLoaderProvider,
loaderPortalRef,
} from './hooks';
import ThemeProvider from './hooks/ThemeProvider';
import ToastProvider from './hooks/ToastProvider';

// Apollo on app error messaging instead of error messages in webpages
if (process.env.NODE_ENV === 'development') {
Expand Down
2 changes: 1 addition & 1 deletion src/app/(error)/403/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import NextLink from 'next/link';
import { Col, Row } from 'react-grid-system';
import dnaLockedImage from '../../../../public/assets/dna-locked.svg';
import logoMarkImage from '../../../../public/assets/logomark.svg';
import { useAppConfigContext } from '../../hooks/AppProvider';
import { useAppConfigContext } from '../../../hooks/AppProvider';

export default function Error403Page() {
const { DOCS_URL_ROOT } = useAppConfigContext();
Expand Down
41 changes: 5 additions & 36 deletions src/app/(post-login)/submission/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023 The Ontario Institute for Cancer Research. All rights reserved
* Copyright (c) 2024 The Ontario Institute for Cancer Research. All rights reserved
*
* This program and the accompanying materials are made available under the terms of
* the GNU Affero General Public License v3.0. You should have received a copy of the
Expand All @@ -18,40 +18,9 @@
*/
'use client';

import { HEADER_HEIGHT_PX } from '@/app/components/Header';
import { css, useTheme } from '@/lib/emotion';
import { ReactNode, useState } from 'react';
import SideMenu from './components/SideMenu/Menu';
import Layout from '@/components/layouts';
import { FunctionComponentChildren } from '@/global/types';

export default function AppLayout({ children }: { children: ReactNode }) {
const theme = useTheme();
const RootLayout = ({ children }: FunctionComponentChildren) => <Layout.App>{children}</Layout.App>;

const [isSidebarActive, setSidebarActive] = useState<boolean>(true);

return (
<div
css={css`
display: grid;
grid-template-columns: ${isSidebarActive
? '248px calc(100vw - 248px)'
: '40px calc(100vw - 40px)'};
transition: 300ms;
background: ${theme.colors.grey_4};
`}
>
<div
css={css`
height: calc(100vh - ${HEADER_HEIGHT_PX}px);
z-index: 1;
box-shadow: ${theme.shadows.pageElement};
`}
>
<SideMenu
isActive={isSidebarActive}
onToggle={() => setSidebarActive((active) => !active)}
/>
</div>
<>{children}</>
</div>
);
}
export default RootLayout;
2 changes: 1 addition & 1 deletion src/app/(post-login)/submission/program-table/config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import { Program } from '@/__generated__/gateway/graphql';
import { notNull } from '@/global/utils';
import { ColumnDef } from '@icgc-argo/uikit';
import { ArgoMembershipKey } from '../components/ProgramList';
import { ArgoMembershipKey } from '../../../../views/Submission/components/ProgramList';
import CancerTypes from './CancerTypes';
import Countries from './Countries';
import DonorStatus from './DonorStatus';
Expand Down

This file was deleted.

Loading