diff --git a/src/Layout.tsx b/src/Layout.tsx index 5d033f8..f3105a1 100644 --- a/src/Layout.tsx +++ b/src/Layout.tsx @@ -1,9 +1,11 @@ -import React, { useEffect, ReactElement } from 'react' +import React, { useEffect } from 'react' import styled from 'styled-components' -import { observer, inject } from 'mobx-react' +import { inject } from 'mobx-react' import Store from './Store' +import { Profile as ProfileType } from './domain' import GroupsSidebar from './components/GroupsSidebar' +import Avatar from './components/Avatar' const DRAWER_WIDTH = 240 const HEADER_HEIGHT = 80 @@ -11,16 +13,11 @@ const FOOTER_HEIGHT = 60 const PRIMARY = '#4267b2' const BACKGROUND = '3578E5' -export interface LayoutProps { - store: Store - children: ReactElement +interface LayoutProps { + profile: ProfileType } -const Layout = ({ store, children }: LayoutProps) => { - useEffect(() => { - store.groupsGetAll() - }, [store]) - +export const Layout: React.FC = ({ profile, children }) => { return (
@@ -44,8 +41,8 @@ const Layout = ({ store, children }: LayoutProps) => {