ADDED all routes
parent
22154d1953
commit
0ae333e7aa
17
src/App.js
17
src/App.js
|
@ -2,8 +2,15 @@ import { BrowserRouter as Router, Route, Switch } from 'react-router-dom';
|
|||
import React, { Suspense, lazy } from 'react';
|
||||
|
||||
const Home = lazy(() => import('./routes/Home'));
|
||||
const Film = lazy(() => import('./routes/Film'));
|
||||
const Anime = lazy(() => import('./routes/Anime'));
|
||||
const Notfound = lazy(() => import('./routes/notfound'));
|
||||
const SerieTV = lazy(() => import('./routes/SerieTV'));
|
||||
const Immagini = lazy(() => import('./routes/Immagini'));
|
||||
const Musica = lazy(() => import('./routes/Musica'));
|
||||
const Giochi = lazy(() => import('./routes/Giochi'));
|
||||
const Programmi = lazy(() => import('./routes/Programmi'));
|
||||
|
||||
const NotFound = lazy(() => import('./routes/NotFound'));
|
||||
|
||||
|
||||
class App extends React.Component {
|
||||
|
@ -13,9 +20,15 @@ class App extends React.Component {
|
|||
<Suspense fallback={<div>Loading...</div>}>
|
||||
<Switch>
|
||||
<Route exact path="/" component={Home}/>
|
||||
<Route path="/Film" component={Film}/>
|
||||
<Route path="/Anime" component={Anime}/>
|
||||
<Route path="/SerieTV" component={SerieTV}/>
|
||||
<Route path="/Immagini" component={Immagini}/>
|
||||
<Route path="/Musica" component={Musica}/>
|
||||
<Route path="/Giochi" component={Giochi}/>
|
||||
<Route path="/Programmi" component={Programmi}/>
|
||||
|
||||
<Route component={Notfound} />
|
||||
<Route component={NotFound} />
|
||||
</Switch>
|
||||
</Suspense>
|
||||
</Router>
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
import React from 'react';
|
||||
import Navbar from '../Navbar';
|
||||
|
||||
class Film extends React.Component {
|
||||
render() {
|
||||
return (
|
||||
<>
|
||||
<Navbar brand="FILM" />
|
||||
</>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Film;
|
|
@ -0,0 +1,14 @@
|
|||
import React from 'react';
|
||||
import Navbar from '../Navbar';
|
||||
|
||||
class Giochi extends React.Component {
|
||||
render() {
|
||||
return (
|
||||
<>
|
||||
<Navbar brand="GIOCHI" />
|
||||
</>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Giochi;
|
|
@ -0,0 +1,14 @@
|
|||
import React from 'react';
|
||||
import Navbar from '../Navbar';
|
||||
|
||||
class Immagini extends React.Component {
|
||||
render() {
|
||||
return (
|
||||
<>
|
||||
<Navbar brand="IMMAGINI" />
|
||||
</>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Immagini;
|
|
@ -0,0 +1,14 @@
|
|||
import React from 'react';
|
||||
import Navbar from '../Navbar';
|
||||
|
||||
class Musica extends React.Component {
|
||||
render() {
|
||||
return (
|
||||
<>
|
||||
<Navbar brand="MUSICA" />
|
||||
</>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Musica;
|
|
@ -0,0 +1,14 @@
|
|||
import React from 'react';
|
||||
import Navbar from '../Navbar';
|
||||
|
||||
class Programmi extends React.Component {
|
||||
render() {
|
||||
return (
|
||||
<>
|
||||
<Navbar brand="PROGRAMMI" />
|
||||
</>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Programmi;
|
|
@ -0,0 +1,14 @@
|
|||
import React from 'react';
|
||||
import Navbar from '../Navbar';
|
||||
|
||||
class SerieTV extends React.Component {
|
||||
render() {
|
||||
return (
|
||||
<>
|
||||
<Navbar brand="SerieTV" />
|
||||
</>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default SerieTV;
|
Loading…
Reference in New Issue