import React from 'react';
import ReactDOM from 'react-dom';


import Admin from "layouts/Admin.js";
import Auth from "layouts/Auth.js";
import "@fortawesome/fontawesome-free/css/all.min.css";
import "assets/styles/tailwind.css";
// views without layouts

import Landing from "views/Landing.js";
import Profile from "views/Profile.js";
import Index from "views/Index.js";
import BooksPreview from 'components/BooksPreview/BooksPreview';


import { BrowserRouter, Route, Switch, Redirect } from "react-router-dom";

import Testcom from 'bookpage/Test';
import Addbooks from 'bookpage/Addbook';
import Editbooks from 'bookpage/Editui';
import Hightedbook from 'bookpage/component/Hightedbook';
import Bookdetail from 'bookpage/component/BookDetail';



ReactDOM.render(
    <BrowserRouter>
      <Switch>
        <Route path="/admin" component={Admin} />
        <Route path="/auth" component={Auth} />
        
        <Route path="/books/:Isbn" component={Testcom} />
        <Route path="/test/:bookId" component={Hightedbook} />
        <Route path="/testing/:databook" component={Bookdetail} />
        <Route path="/add" component={Addbooks} />
        <Route path="/edit" component={Editbooks} />
        <Route path="/landing" exact component={Landing} />
        <Route path="/index" exact component={Index} />
        <Route path="/profile" exact component={Profile} />
        <Route path="/" exact component={Landing} />
        <Redirect from="" to="/" />
      </Switch>
    </BrowserRouter>,
    document.getElementById("root")
  );