aboutsummaryrefslogtreecommitdiffstats
path: root/webui/src/layout/index.tsx
blob: 78ff5ae8061982383adb54502dfc3ff51bd03b53 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import React from 'react';

import CssBaseline from '@material-ui/core/CssBaseline';

import { useCurrentIdentityQuery } from './CurrentIdentity.generated';
import CurrentIdentityContext from './CurrentIdentityContext';
import Header from './Header';

type Props = { children: React.ReactNode };
function Layout({ children }: Props) {
  return (
    <CurrentIdentityContext.Provider value={useCurrentIdentityQuery()}>
      <CssBaseline />
      <Header />
      {children}
    </CurrentIdentityContext.Provider>
  );
}

export default Layout;