import React, { FC } from 'react';
import { ThemeProvider } from 'styled-components';
import config from './config';
import { GlobalStyle } from '.';

const TheLandingProvider: FC<{ theme?: any }> = ({ children, theme }) => (
  <ThemeProvider
    theme={theme ? (theme as typeof theme) : (config as typeof config)}
  >
    <GlobalStyle />
    {children}
  </ThemeProvider>
);

export default TheLandingProvider;
