-
Notifications
You must be signed in to change notification settings - Fork 1
/
RoutesPath.jsx
32 lines (26 loc) · 1.15 KB
/
RoutesPath.jsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import React, { lazy } from "react";
// Pages
const Home = lazy(() => import("../pages/Home"));
const About = lazy(() => import("../pages/About"));
const Contact = lazy(() => import("../pages/Contact"));
const TopRatedGames = lazy(() => import("../pages/games/top"));
const DisplayGameInfo = lazy(() => import("../pages/games/DisplayGameInfo"));
const TopGamesStreaming = lazy(() => import("../pages/streams"));
const ErrorPage = lazy(() => import("../pages/404"));
const DisplayMostViewedStreams =
lazy(() => import("../pages/streams/DisplayMostViewedStreams"));
const DisplayStreamsByGame =
lazy(() => import("../pages/streams/DisplayStreamsByGame"));
// Page path
const routes = [
{ path: "/", component: Home },
{ path: "/about", component: About },
{ path: "/Contact", component: Contact },
{ path: "/games/top", component: TopRatedGames },
{ path: "/games/:gId", component: DisplayGameInfo },
{ path: "/streams/", component: TopGamesStreaming },
{ path: "/streams/most-viewed", component: DisplayMostViewedStreams },
{ path: "/streams/:gameId", component: DisplayStreamsByGame },
{ path: "*", component: ErrorPage },
];
export default routes;