import ManufacturerList from './manufacturerList';
import {Route, Switch} from 'react-router-dom';
import Loading from '../utility/loading';
import React from 'react';
import ManufacturerForm from './manufacturerForm';

const ManufacturerPage = () => {
    return (
        <React.Suspense fallback={<Loading/>}>
            <Switch>
                <Route exact path="/manufactures" component={ManufacturerList}/>
                <Route path="/manufactures/form/:id" component={ManufacturerForm}/>
                <Route exact path="/manufactures/form" component={ManufacturerForm}/>
            </Switch>
        </React.Suspense>
    )
}

export default ManufacturerPage;
