import {useEffect, useState} from 'react'
import PageTitle from '../../components/PageTitle'
import Filter from '../../components/Filter'
import ProductList from '../../components/ProductList'
import { Box } from '@mui/material'
import SocialMedia from '../../components/SocialMedia'
import Feature from '../../components/Feature'

const Products = () => {

  useEffect(()=>{
    
    // if user come from select collection
    if(sessionStorage.getItem('amber-select-product-type')){

      let selectProductType = sessionStorage.getItem('amber-select-product-type')

    }else{
      window.location.href = '/'
    }

  },[])

  return (
    <>
      <Box sx={{
        mt:15,
        px: {
          xs: 2,
          md: 12,
          lg: 20
        },
        mb: {
          xs: 0,
          md: 5,
          lg: 10
        }
      }}>
        <ProductList />
        <SocialMedia />
        <Feature />
      </Box>
    </>
  )
}

export default Products