import { MetaProvider } from '@solidjs/meta'
import { Toaster } from 'solid-toast'
import './App.scss'
import { SiteContextProvider } from './context/SiteContext'

function App(props) {
  return (
    <MetaProvider>
      <SiteContextProvider>
        <Toaster
          containerStyle={
            props.location?.pathname.indexOf('/login') >= 0
              ? null
              : { 'margin-top': '60px' }
          }
        />
        {props.children}
      </SiteContextProvider>
    </MetaProvider>
  )
}

export default App
