import React from 'react';
import '../../css/Views/ticket.css';
import Header from '../Components/Header';
import Navbar from '../Components/Navbar';
import 'react-perfect-scrollbar/dist/css/styles.css';
import Footer from '../Components/Footer';
import { Link } from 'react-router-dom';
import SearchBar from '../Components/SearchBar';

export default class Stock extends React.Component {

  constructor(props){
    super(props)
    this.state = {
    }
  }

  componentDidMount() {
}

    render() {
      if (!sessionStorage.getItem('token')){
        return (<div id="errorRouteBlock"><div id="errorRouteTitle">ERREUR </div><br/><div id="errorRouteTxt">Vous n'êtes pas connecté</div><br/><Link id="link" to='/'>Retourner à l'Accueil</Link></div>)
      } else {
      return (
          <div id="stock">
              <Header title='Le Ticket de Caisse'/>
              <Navbar redirect="/stock" left="Monnaie" right="Le Stock"/>
              <SearchBar/>
              <div id="emptyTicketBox">
                <p id="emptyTicket">
                Scanne tes articles pour remplir le ticket de caisse ! 
                </p>
              </div>
              <Footer/>
          </div>
      )}
    }
  }