2021-02-23 12:45:42 -08:00
|
|
|
import React from 'react';
|
2021-03-09 23:14:52 -08:00
|
|
|
import styled from 'styled-components';
|
2022-11-16 20:22:17 -08:00
|
|
|
import { CorpUser } from '../../types.generated';
|
2021-10-26 21:23:08 -07:00
|
|
|
import { useGetAuthenticatedUser } from '../useGetAuthenticatedUser';
|
|
|
|
import { HomePageRecommendations } from './HomePageRecommendations';
|
2021-03-09 23:14:52 -08:00
|
|
|
|
|
|
|
const BodyContainer = styled.div`
|
2021-10-26 21:23:08 -07:00
|
|
|
padding: 20px 100px;
|
|
|
|
margin: 0;
|
2021-03-09 23:14:52 -08:00
|
|
|
background-color: ${(props) => props.theme.styles['homepage-background-lower-fade']};
|
2021-10-26 21:23:08 -07:00
|
|
|
> div {
|
|
|
|
margin-bottom: 20px;
|
|
|
|
}
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
2021-03-09 23:14:52 -08:00
|
|
|
`;
|
2021-02-23 12:45:42 -08:00
|
|
|
|
|
|
|
export const HomePageBody = () => {
|
2022-11-16 20:22:17 -08:00
|
|
|
const user: CorpUser = useGetAuthenticatedUser()?.corpUser as CorpUser;
|
|
|
|
return <BodyContainer>{user && <HomePageRecommendations user={user} />}</BodyContainer>;
|
2021-02-23 12:45:42 -08:00
|
|
|
};
|